KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/irtiweb/CATS/vendor/behat/gherkin/tests/Behat/Gherkin/Filter/NarrativeFilterTest.php
<?php

namespace Tests\Behat\Gherkin\Filter;

use Behat\Gherkin\Filter\NarrativeFilter;
use Behat\Gherkin\Node\FeatureNode;

class NarrativeFilterTest extends FilterTest
{
    public function testIsFeatureMatchFilter()
    {
        $description = <<<NAR
In order to be able to read news in my own language
As a french user
I need to be able to switch website language to french
NAR;
        $feature = new FeatureNode(null, $description, array(), null, array(), null, null, null, 1);

        $filter = new NarrativeFilter('/as (?:a|an) french user/');
        $this->assertFalse($filter->isFeatureMatch($feature));

        $filter = new NarrativeFilter('/as (?:a|an) french user/i');
        $this->assertTrue($filter->isFeatureMatch($feature));

        $filter = new NarrativeFilter('/french .*/');
        $this->assertTrue($filter->isFeatureMatch($feature));

        $filter = new NarrativeFilter('/^french/');
        $this->assertFalse($filter->isFeatureMatch($feature));

        $filter = new NarrativeFilter('/user$/');
        $this->assertFalse($filter->isFeatureMatch($feature));
    }
}

Anon7 - 2021