use PHPUnit\Framework\TestCase;
use Symfony\Component\Finder\Comparator\Comparator;
class ComparatorTest extends TestCase
{ public function testInvalidOperator() { $this->
expectException(\InvalidArgumentException::
class);
$this->
expectExceptionMessage('Invalid operator "foo".'
);
new Comparator('some target', 'foo'
);
} /**
* @dataProvider provideMatches
*/
public function testTestSucceeds(string
$operator, string
$target, string
$testedValue) { $c =
new Comparator($target,
$operator);
$this->
assertSame($target,
$c->
getTarget());
$this->
assertSame($operator,
$c->
getOperator());