FluidTYPO3\Fluidpages\Service\ConfigurationService::injectResourceFactory PHP Метод

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

public injectResourceFactory ( TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory ) : void
$resourceFactory TYPO3\CMS\Core\Resource\ResourceFactory
Результат void
    public function injectResourceFactory(ResourceFactory $resourceFactory)
    {
        $this->resourceFactory = $resourceFactory;
    }

Usage Example

 /**
  * @dataProvider getConvertFileReferenceToTemplatePathAndFilenameTestValues
  * @param string $reference
  * @param string|NULL $resourceFactoryOutput
  * @param string $expected
  * @return void
  */
 public function testConvertFileReferenceToTemplatePathAndFilename($reference, $resourceFactoryOutput, $expected)
 {
     $instance = new ConfigurationService();
     if (NULL !== $resourceFactoryOutput) {
         $resourceFactory = $this->getMock('TYPO3\\CMS\\Core\\Resource\\ResourceFactory', array('getFileObjectFromCombinedIdentifier'));
         $resourceFactory->expects($this->once())->method('getFileObjectFromCombinedIdentifier')->with($reference)->willReturn($resourceFactoryOutput);
         $instance->injectResourceFactory($resourceFactory);
     }
     $result = $instance->convertFileReferenceToTemplatePathAndFilename($reference);
     $this->assertEquals($expected, $result);
 }