PhpSpec\Locator\PSR0\PSR0Resource::getSpecFilename PHP Метод

getSpecFilename() публичный Метод

public getSpecFilename ( ) : string
Результат string
    public function getSpecFilename()
    {
        if ($this->locator->isPSR4()) {
            return $this->locator->getFullSpecPath() . implode(DIRECTORY_SEPARATOR, $this->parts) . 'Spec.php';
        }
        $nsParts = $this->parts;
        $classname = array_pop($nsParts);
        $parts = array_merge($nsParts, explode('_', $classname));
        return $this->locator->getFullSpecPath() . implode(DIRECTORY_SEPARATOR, $parts) . 'Spec.php';
    }

Usage Example

 public function hasSpec(PSR0Resource $resource)
 {
     return $this->filesystem->pathExists($resource->getSpecFilename());
 }