spec\PhpSpec\Locator\PSR0\PSR0LocatorSpec::it_finds_spec_resources_with_classname_underscores_via_srcPath PHP Метод

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

public it_finds_spec_resources_with_classname_underscores_via_srcPath ( Filesystem $fs, SplFileInfo $file )
$fs PhpSpec\Util\Filesystem
$file SplFileInfo
    function it_finds_spec_resources_with_classname_underscores_via_srcPath(Filesystem $fs, SplFileInfo $file)
    {
        $this->beConstructedWith($fs, 'PhpSpec', 'spec', $this->srcPath, $this->specPath);
        $filePath = $this->specPath . $this->convert_to_path('/spec/PhpSpec/Some/ClassSpec.php');
        $fs->pathExists($this->specPath . $this->convert_to_path('/spec/PhpSpec/'))->willReturn(true);
        $fs->findSpecFilesIn($this->specPath . $this->convert_to_path('/spec/PhpSpec/'))->willReturn(array($file));
        $fs->getFileContents($filePath)->willReturn('<?php namespace spec\\PhpSpec; class Some_Class {} ?>');
        $file->getRealPath()->willReturn($filePath);
        $resources = $this->findResources($this->srcPath);
        $resources->shouldHaveCount(1);
        $resources[0]->getSrcClassname()->shouldReturn('PhpSpec\\Some_Class');
    }
PSR0LocatorSpec