I wrote a test like this for tipo_vehiculo model in my app

>
>     function testActive() {
>       $this->TipoVehiculo =& ClassRegistry::init('TipoVehiculo');
>       $this->TipoVehiculo->recursive=-1;
>       $result = $this->TipoVehiculo->active(33);
>       $this->assertTrue($result);
>     }
>
> The TipoVehiculo model has the active method but the test instead of 
calling the method is trying to perfom a query becouse I recieve this 
message

>
> Query: select 
>
> and

>
> Error
> Unexpected PHP error [<span style="color:Red;text-align:left"><b>SQL 
> Error:</b> 1064: You have an error in your SQL syntax; check the manual that 
> corresponds to your MySQL server version for the right syntax to use near 
> 'active' at line 1</span>] severity [E_USER_WARNING] in 
> [/var/www/cemumasa/cake/libs/model/datasources/dbo_source.php line 684]
>
>
> Does anyone have an idea why the metod $this->TipoVehiculo->active() is 
never called?

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to