X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fbehat%2Fgherkin%2Ftests%2FBehat%2FGherkin%2FFilter%2FPathsFilterTest.php;fp=vendor%2Fbehat%2Fgherkin%2Ftests%2FBehat%2FGherkin%2FFilter%2FPathsFilterTest.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=e106d734ff396dd790f5ed750207a4cb12356286;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/behat/gherkin/tests/Behat/Gherkin/Filter/PathsFilterTest.php b/vendor/behat/gherkin/tests/Behat/Gherkin/Filter/PathsFilterTest.php deleted file mode 100644 index e106d734f..000000000 --- a/vendor/behat/gherkin/tests/Behat/Gherkin/Filter/PathsFilterTest.php +++ /dev/null @@ -1,58 +0,0 @@ -assertTrue($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array('/abc', '/def', dirname(__DIR__))); - $this->assertTrue($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array('/abc', '/def', __DIR__)); - $this->assertTrue($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array('/abc', __DIR__, '/def')); - $this->assertTrue($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array('/abc', '/def', '/wrong/path')); - $this->assertFalse($filter->isFeatureMatch($feature)); - } - - public function testItDoesNotMatchPartialPaths() - { - $fixtures = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR; - - $feature = new FeatureNode(null, null, array(), null, array(), null, null, $fixtures . 'full_path' . DIRECTORY_SEPARATOR . 'file1', 1); - - $filter = new PathsFilter(array($fixtures . 'full')); - $this->assertFalse($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array($fixtures . 'full' . DIRECTORY_SEPARATOR)); - $this->assertFalse($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array($fixtures . 'full_path' . DIRECTORY_SEPARATOR)); - $this->assertTrue($filter->isFeatureMatch($feature)); - - $filter = new PathsFilter(array($fixtures . 'full_path')); - $this->assertTrue($filter->isFeatureMatch($feature)); - } - - public function testItDoesNotMatchIfFileWithSameNameButNotPathExistsInFolder() - { - $fixtures = __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR; - - $feature = new FeatureNode(null, null, array(), null, array(), null, null, $fixtures . 'full_path' . DIRECTORY_SEPARATOR . 'file1', 1); - - $filter = new PathsFilter(array($fixtures . 'full')); - $this->assertFalse($filter->isFeatureMatch($feature)); - } -}