1) ProjectTest::testDelete CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`trackstar_test`.`tbl_project_user_role`, CONSTRAINT `tbl_project_user_role_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `tbl_project` (`id`)) C:\inetpub\wwwroot\Yii 1.1.5\framework\db\CDbCommand.php:256 C:\inetpub\wwwroot\Yii 1.1.5\framework\db\ar\CActiveRecord.php:1647 C:\inetpub\wwwroot\Yii 1.1.5\framework\db\ar\CActiveRecord.php:1113 C:\inetpub\wwwroot\Yii 1.1.5\trackstar\protected\tests\unit\ProjectTest.php:75 FAILURES! Tests: 7, Assertions: 14, Errors: 1.
On page 199, at the top of the page when I modify the testIsInRole() function I am getting the above error when I run the ProjectTest.php.
ProjectTest.php line 75 refers to this code:
$this->assertTrue($project->delete());
All my tests ran flawlessly up until this point, can someone give me a pointer as to what I might be doing wrong here?

Help












