%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/water/vendor/behat/gherkin/tests/Behat/Gherkin/Filter/ |
Upload File : |
<?php namespace Tests\Behat\Gherkin\Filter; use Behat\Gherkin\Filter\PathsFilter; use Behat\Gherkin\Node\FeatureNode; class PathsFilterTest extends FilterTest { public function testIsFeatureMatchFilter() { $feature = new FeatureNode(null, null, array(), null, array(), null, null, __FILE__, 1); $filter = new PathsFilter(array(__DIR__)); $this->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)); $filter = new PathsFilter(array($fixtures . 'ful._path')); // Don't accept regexp $this->assertFalse($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)); } }