/** * @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()); }