/** * (non-PHPdoc) * @see Zend_Config::get() */ public function get($name, $default = null) { $value = parent::get($name, $default); $isGlobal = KalturaGlobalData::isGlobalData($value); if ($isGlobal) { $value = KalturaGlobalData::getData($value); } else { if ($value instanceof Zend_Config) { //We transform it to be a test configuration object so we can take global data from it $value = KalturaTestConfig::fromZendConfig($value); } } return $value; }
/** * * Compares the $actualValue with the $expectedValue on the given field / property, no Exception is thrown * @param string $fieldName * @param object $actualValue * @param object $expectedResult * @throws no exception can be thrown (for mass compares) */ public function compareOnField($fieldName, $actualValue, $expectedValue, $assertToPerform, $message = null) { try { $this->currentFailure = new KalturaFailure($fieldName, $actualValue, $expectedValue, $assertToPerform, $message); if (!is_null($expectedValue)) { $isGlobalData = KalturaGlobalData::isGlobalData($expectedValue); if ($isGlobalData) { $expectedValue = KalturaGlobalData::getData($expectedValue); } } $this->{$assertToPerform}($expectedValue, $actualValue, $this->currentFailure); } catch (PHPUnit_Framework_AssertionFailedError $e) { $this->hasFailures = true; $resultObject = $this->getTestResultObject(); if ($resultObject) { $resultObject->addFailure($this, $e, PHP_Timer::stop()); } else { $name = $this->getName(true); //print("In add failure Result is NULL for test [$name]\n"); } } catch (Exception $e) { $this->getTestResultObject()->addError($this, $e, PHP_Timer::stop()); } }