Fixtures problem - cakephp 2.0 unit-testing
I cant find answer how to work with fixtures, i'm working in big project and my task is to start writing tests to all system controllers nad models but i cant handle with fixtures they still give me pdo errors ; / for e.x. my fixture to UserRoleHistoryFixture.php looks this way:
<?php
class UserRoleHistoryFixture extends CakeTestFixture {
public $name = 'UserRoleHistory';
public $import = array('model' => 'UserRoleHistory', 'records' => false, 'connection' => 'test');
}
im using its this way:
class UserTest extends CakeTestCase {
public $fixtures = array('app.user', 'app.user_role', 'app.session',
'app.users_activity', 'app.user_role_history'
);
public $controllerName = 'Users';
public $autoRedirect = false;
public function setUp() {
parent::setUp();
$this->loadFixtures('User');
}
}
my every fixture looks this way, as it was shown on cakebook http://book.cakephp.org/2.0/en/development/testing.html i have no idea what to do now, so im asking for help.
-- You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home