Hi all,

Agavi 1.0.3
Propel 1.6

how to Mock database, model's methods?

Now for test model method i write:

public function testUserApproveExceptionId() {
    $stub = $this->getMock('User_Manager');
    $stub->expects($this->any())
             ->method('lookupByEmail')
             ->will($this->returnValue(FALSE));

    $stub->lookupByEmail('[email protected]');

And i get output:
Fatal error: Call to undefined method Mock_User_ManagerModel_da0eb08d::lookupByEmail() in /var/www/www.sitename.web/test/tests/unit/User_ManagerModelTest.php on line 169
Call Stack: ............


What else is need to do, to make this work?
Thanx!

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to