/** * @covers phpDocumentor\Descriptor\Example\Finder::find * @covers phpDocumentor\Descriptor\Example\Finder::getExampleFileContents * @covers phpDocumentor\Descriptor\Example\Finder::constructExamplePath */ public function testFindExampleContentsInExampleDirectory() { $directories = array(vfsStream::url('base/exampleDirectory'), vfsStream::url('base/exampleDirectory2')); $descriptor = $this->givenADescriptorWithExamplePath('example.txt'); $this->givenTheDirectoryStructure(array('exampleDirectory' => array(), 'exampleDirectory2' => array('example.txt' => self::EXAMPLE_TEXT), 'source' => array('example.txt' => 'this is not it'))); $this->fixture->setExampleDirectories($directories); $this->fixture->setSourceDirectory(vfsStream::url('base/source')); $result = $this->fixture->find($descriptor); $this->assertSame(self::EXAMPLE_TEXT, $result); }