use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\TestFailure;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful;
final class CommandIsSuccessfulTest extends TestCase
{ public function testConstraint() { $constraint =
new CommandIsSuccessful();
$this->
assertTrue($constraint->
evaluate(Command::SUCCESS, '', true
));
$this->
assertFalse($constraint->
evaluate(Command::FAILURE, '', true
));
$this->
assertFalse($constraint->
evaluate(Command::INVALID, '', true
));
} /**
* @dataProvider providesUnsuccessful
*/
public function testUnsuccessfulCommand(string
$expectedException, int
$exitCode) {