getFixtureManager()->getRows($name))!==false) return $rows; else throw new Exception("Unknown property '$name' for class '".get_class($this)."'."); } public function __call($name,$params) { if(isset($params[0]) && ($record=$this->getFixtureManager()->getRecord($name,$params[0]))!==false) return $record; else throw new Exception("Unknown method '$name' for class '".get_class($this)."'."); } public function getFixtureManager() { return Yii::app()->getComponent('fixture'); } public function fixtures() { return array(); } public function setUp() { parent::setUp(); $this->getFixtureManager()->load($this->fixtures()); } }