/**
  * @covers phpDocumentor\Transformer\Template\Factory::getAllNames
  */
 public function testRetrieveAllTemplateNames()
 {
     // Arrange
     $expected = array('template1', 'template2');
     $root = vfsStream::setup('exampleDir');
     $root->addChild(vfsStream::newDirectory($expected[0]));
     $root->addChild(vfsStream::newFile('aFile.txt'));
     $root->addChild(vfsStream::newDirectory($expected[1]));
     $this->pathResolverMock->shouldReceive('getTemplatePath')->andReturn(vfsStream::url('exampleDir'));
     // Act
     $result = $this->fixture->getAllNames();
     // Assert
     $this->assertSame($expected, $result);
 }
Example #2
0
 /**
  * Returns the path where all templates are stored.
  *
  * @return string
  */
 public function getTemplatePath()
 {
     return $this->pathResolver->getTemplatePath();
 }