Thanks for reply.
Actually I have some checks like
if (!class_exists('RatePlanMock')) {...}
they were removed to simplify code (and it actually works when there is only
1 test)
User and RatePlan classes were imported also
Trick was in 2nd argument of $this->getMock(). It appeared that for models
you can't create "full" mock, only "partial", so you need to mock only
methods you will use with expects() method
*Solution:*
$this->RatePlanMock = $this->getMock(
'RatePlan',
*array('getApiLevels'), *// this way it works fine
array(),
'RatePlanMock'
);
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php