本文整理匯總了PHP中TYPO3\CMS\Core\Resource\File::setAvailableProperties方法的典型用法代碼示例。如果您正苦於以下問題:PHP File::setAvailableProperties方法的具體用法?PHP File::setAvailableProperties怎麽用?PHP File::setAvailableProperties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Resource\File
的用法示例。
在下文中一共展示了File::setAvailableProperties方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: propertiesPassedToConstructorAreAvailableViaGenericGetter
/**
* @test
* @todo Old code getAvailableProperties() needs to be replaced by current behaviour
*/
public function propertiesPassedToConstructorAreAvailableViaGenericGetter()
{
$this->markTestSkipped('TYPO3\\CMS\\Core\\Resource\\File::getAvailableProperties() does not exist');
$properties = array($this->getUniqueId() => $this->getUniqueId(), $this->getUniqueId() => $this->getUniqueId(), 'uid' => 1);
$fixture = new \TYPO3\CMS\Core\Resource\File($properties, $this->storageMock);
$availablePropertiesBackup = \TYPO3\CMS\Core\Resource\File::getAvailableProperties();
\TYPO3\CMS\Core\Resource\File::setAvailableProperties(array_keys($properties));
foreach ($properties as $key => $value) {
$this->assertTrue($fixture->hasProperty($key));
$this->assertEquals($value, $fixture->getProperty($key));
}
$this->assertFalse($fixture->hasProperty($this->getUniqueId()));
\TYPO3\CMS\Core\Resource\File::setAvailableProperties($availablePropertiesBackup);
$this->setExpectedException('InvalidArgumentException', '', 1314226805);
$fixture->getProperty($this->getUniqueId());
}