for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the ExcludeSpecificationsExtension package.
*
* (c) Kamil Kokot <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FriendsOfBehat\ExcludeSpecificationsExtension\Locator;
use Behat\Testwork\Specification\Locator\SpecificationLocator;
use Behat\Testwork\Specification\SpecificationIterator;
use Behat\Testwork\Suite\Suite;
/**
* @internal
final class ExcludingSpecificationLocator implements SpecificationLocator
{
* @var SpecificationLocator
private $specificationLocator;
* @var array
private $skippedPaths;
* @param SpecificationLocator $filesystemFeatureLocator
* @param array $skippedPaths
public function __construct(SpecificationLocator $filesystemFeatureLocator, array $skippedPaths)
$this->specificationLocator = $filesystemFeatureLocator;
$this->skippedPaths = $skippedPaths;
}
* {@inheritdoc}
public function getLocatorExamples(): array
return $this->specificationLocator->getLocatorExamples();
public function locateSpecifications(Suite $suite, $locator): SpecificationIterator
return new ExcludingSpecificationIterator(
$this->specificationLocator->locateSpecifications($suite, $locator),
$this->skippedPaths
);