public function testReaderResultIsCached() { $testCase = new TestsCases\BaseTestCase(); $classInformation = Reader::getClassInformation($testCase); $reflectionObject = new \ReflectionObject($testCase); $cacheId = md5("classInformation:" . $reflectionObject->getName()); $this->assertEquals($classInformation, Reader::getFromCache($cacheId)); }
/** * Get every information needed from this class. */ private function getPropertiesInfo() { if (!$this->_automatedBehaviorInitialized) { $classInfo = Reader::getClassInformation($this); $this->_accessProperties = $classInfo['accessProperties']; $this->_collectionsItemNames = $classInfo['collectionsItemNames']; $this->_associationsList = $classInfo['associationsList']; $this->_initialPropertiesValues = $classInfo['initialPropertiesValues']; $this->_initializationNeededArguments = $classInfo['initializationNeededArguments']; if ($this->_constraintsValidationEnabled === null) { $this->_constraintsValidationEnabled = $classInfo['constraintsValidationEnabled']; } $this->_automatedBehaviorInitialized = true; } }