You are here

public function NumberComparatorTest::testConstructor in Database Sanitize 7

@dataProvider getConstructorTestData

File

vendor/symfony/finder/Tests/Comparator/NumberComparatorTest.php, line 22

Class

NumberComparatorTest

Namespace

Symfony\Component\Finder\Tests\Comparator

Code

public function testConstructor($successes, $failures) {
  foreach ($successes as $s) {
    new NumberComparator($s);
  }
  foreach ($failures as $f) {
    try {
      new NumberComparator($f);
      $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.');
    }
  }
}