public injectResourceFactory ( TYPO3\CMS\Core\Resource\ResourceFactory $resourceFactory ) : void | ||
$resourceFactory | TYPO3\CMS\Core\Resource\ResourceFactory | |
리턴 | void |
/** * @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); }