minor #33647 [Messenger] fix tests (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] fix tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

cfd6d645ef fix tests
This commit is contained in:
Nicolas Grekas 2019-09-20 13:15:00 +02:00
commit fb6d5913e6

View File

@ -13,7 +13,8 @@ namespace Symfony\Component\Messenger\Tests\Command;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\Debug\Exception\FlattenException;
use Symfony\Component\Debug\Exception\FlattenException as LegacyFlattenException;
use Symfony\Component\ErrorRenderer\Exception\FlattenException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Messenger\Command\FailedMessagesRetryCommand;
use Symfony\Component\Messenger\Envelope;
@ -71,7 +72,7 @@ class FailedMessagesRetryCommandTest extends TestCase
return $lastRedeliveryStamp instanceof RedeliveryStamp &&
\is_string($lastRedeliveryStamp->getExceptionMessage()) &&
$lastRedeliveryStamp->getFlattenException() instanceof FlattenException;
($lastRedeliveryStamp->getFlattenException() instanceof FlattenException || $lastRedeliveryStamp->getFlattenException() instanceof LegacyFlattenException);
}))
->willReturn(new Envelope(new \stdClass()));