12 namespace Symfony\Component\Finder\Tests\Comparator;
22 $this->fail(
'__construct() throws an \InvalidArgumentException if the test expression is not valid.');
23 }
catch (\Exception $e) {
24 $this->assertInstanceOf(
'InvalidArgumentException', $e,
'__construct() throws an \InvalidArgumentException if the test expression is not valid.');
29 $this->fail(
'__construct() throws an \InvalidArgumentException if the test expression is not valid.');
30 }
catch (\Exception $e) {
31 $this->assertInstanceOf(
'InvalidArgumentException', $e,
'__construct() throws an \InvalidArgumentException if the test expression is not valid.');
38 public function testTest($test, $match, $noMatch)
42 foreach ($match as $m) {
43 $this->assertTrue($c->test($m),
'->test() tests a string against the expression');
46 foreach ($noMatch as $m) {
47 $this->assertFalse($c->test($m),
'->test() tests a string against the expression');
54 array(
'< 2005-10-10', array(strtotime(
'2005-10-09')), array(strtotime(
'2005-10-15'))),
55 array(
'until 2005-10-10', array(strtotime(
'2005-10-09')), array(strtotime(
'2005-10-15'))),
56 array(
'before 2005-10-10', array(strtotime(
'2005-10-09')), array(strtotime(
'2005-10-15'))),
57 array(
'> 2005-10-10', array(strtotime(
'2005-10-15')), array(strtotime(
'2005-10-09'))),
58 array(
'after 2005-10-10', array(strtotime(
'2005-10-15')), array(strtotime(
'2005-10-09'))),
59 array(
'since 2005-10-10', array(strtotime(
'2005-10-15')), array(strtotime(
'2005-10-09'))),
60 array(
'!= 2005-10-10', array(strtotime(
'2005-10-11')), array(strtotime(
'2005-10-10'))),