public function testGetValue() { $inI = 5280; $valueI = new Value($inI); $this->assertEquals($inI, $valueI->getValue()); $inO = new stdClass(); $valueO = new Value($inO); $this->assertEquals($inO, $valueO->getValue()); }
/** * Ensures that argument passed is an object * * @param object $value Value to check * * @return boolean * @throws ContractException */ public static function ensureObject($value) { $valueObject = new Value($value); try { self::ensure($valueObject->isObject()); } catch (ContractException $exception) { $message = self::getExceptionComment($exception); throw new ContractException($message); } return true; }