Problem setting sup fixtures for testing

I have a problem accessing fixtures in my app. I have a table called settings, and my tests directory is set up like this;






(other files and directories omitted for simplicity)


return array(















class SettingsTest extends CDbTestCase


	protected $object;


	public $fixtures = array(




	protected function setUp()


		$this->object = new Settings;




	public function testFixtures()





Please correct me if I am wrong but this is what I expect to happen when I run phpunit on SettingsTest.php…

The settings table in my database gets cleared and replaced with the default data as specified in my fixture file, then I expect the string ‘default’ to be outputed to the screen. Instead, phpunit throws the error

Unknown property 'settings' for class 'SettingsTest'


Where am I going wrong with this?

After a bit of tweaking the problem appears to be in the setUp method. Removing this removes any errors and I can then access my fixture which is probably due to me instantiating the Settings object.

perhapse you forgot to call parent::setUp(); inside your setUp() method?

else it sounds like a bug inside yii for me