コード例 #1
0
ファイル: BaseTest.php プロジェクト: kentonquatman/portfolio
 /**
  * Sets a component, while taking care to restore it in the tear down.
  *
  * @param \CModule $obj
  * @param string   $name
  * @param mixed    $val
  *
  * @return null
  */
 protected function setComponent(\CModule $obj, $name, $val)
 {
     // Save the original value for tearDown()
     $this->_originalComponentValues[] = array($obj, $name, $obj->getComponent($name));
     // Set the new one
     $obj->setComponent($name, $val);
 }