You are here

public function DateComparatorTest::testConstructor in Database Sanitize 7

File

vendor/symfony/finder/Tests/Comparator/DateComparatorTest.php, line 19

Class

DateComparatorTest

Namespace

Symfony\Component\Finder\Tests\Comparator

Code

public function testConstructor() {
  try {
    new DateComparator('foobar');
    $this
      ->fail('__construct() throws an \\InvalidArgumentException if the test expression is not valid.');
  } catch (\Exception $e) {
    $this
      ->assertInstanceOf('InvalidArgumentException', $e, '__construct() throws an \\InvalidArgumentException if the test expression is not valid.');
  }
  try {
    new DateComparator('');
    $this
      ->fail('__construct() throws an \\InvalidArgumentException if the test expression is not valid.');
  } catch (\Exception $e) {
    $this
      ->assertInstanceOf('InvalidArgumentException', $e, '__construct() throws an \\InvalidArgumentException if the test expression is not valid.');
  }
}