|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/irtiweb/CATS/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));
}
}