Hi - I have been following the book and have an issue with chapter 8 on page 191 -> 194 (Implementing the new Project AR methods.)
I’ve created the RBAC tables/details successfully in both _test and _dev.
I’ve added the code to Project.php and ProjectTest.php
After I’ve added in the sql to associateUserToRole() I was expecting to run the phpunit unit/ProjectTest.php test and it to pass - instead I get the following:
D:\Zend\Apache2\htdocs\trackstar\protected\tests>phpunit unit/ProjectTest.php
Notice: Please no longer include "PHPUnit/Framework.php". in D:\Zend\ZendServer\
bin\pear\PHPUnit\Framework.php on line 50
PHPUnit 3.5.5 by Sebastian Bergmann.
…E
Time: 4 seconds, Memory: 9.25Mb
There was 1 error:
- ProjectTest::testUserRoleAssignment
CException: Property "CDbCommand.execute" is not defined.
D:\Zend\Apache2\htdocs\yii114\framework\base\CComponent.php:131
D:\Zend\Apache2\htdocs\trackstar\protected\models\Project.php:127
D:\Zend\Apache2\htdocs\trackstar\protected\tests\unit\ProjectTest.php:95
FAILURES!
Tests: 6, Assertions: 13, Errors: 1.
Not quite sure where I’ve gone wrong - any help gratefully received.
Thanks,
Ed