本文整理汇总了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());
}