Behat\Behat\Gherkin\Specification\Locator\FilesystemRerunScenariosListLocator::locateSpecifications PHP Method

locateSpecifications() public method

public locateSpecifications ( Behat\Testwork\Suite\Suite $suite, $locator )
$suite Behat\Testwork\Suite\Suite
    public function locateSpecifications(Suite $suite, $locator)
    {
        if (!is_file($locator) || 'rerun' !== pathinfo($locator, PATHINFO_EXTENSION)) {
            return new NoSpecificationsIterator($suite);
        }
        $scenarios = json_decode(trim(file_get_contents($locator)), true);
        if (empty($scenarios) || empty($scenarios[$suite->getName()])) {
            return new NoSpecificationsIterator($suite);
        }
        return new LazyFeatureIterator($suite, $this->gherkin, $scenarios[$suite->getName()]);
    }