Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-18 Thread b logica

Actually, it'll give the same error if Cake can't *access* the table.
Pretty much the swam thing, though, for all intents ...

bhushan, make sure the table user_tests exists in the database and the
user that Cake is connecting as has the proper rights to it (GRANT
SELECT,INSERT,UPDATE,DELETE).

On Fri, Apr 18, 2008 at 11:03 AM, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
>  On Fri, Apr 18, 2008 at 2:21 AM, bhushan A <[EMAIL PROTECTED]> wrote:
>  >
>  >  hey thanks amit... it worked but not its giving following error.
>  >  Error:  Database table user_tests for model SiteTest was not found.
>  >  what to do? please help
>
>  The error message is telling you *exactly* what is wrong:  you have no
>  table called 'user_tests' in the database that your model SiteTest is
>  trying to use.
>
>  I am not of the opinion that PHP and CakePHP spits out
>  hard-to-diagnose error messages.
>
>  --
>  Chris Hartjes
>  Internet Loudmouth
>  Motto for 2008: "Moving from herding elephants to handling snakes..."
>  @TheKeyBoard: http://www.littlehart.net/atthekeyboard
>
>
>
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-18 Thread Chris Hartjes

On Fri, Apr 18, 2008 at 2:21 AM, bhushan A <[EMAIL PROTECTED]> wrote:
>
>  hey thanks amit... it worked but not its giving following error.
>  Error:  Database table user_tests for model SiteTest was not found.
>  what to do? please help

The error message is telling you *exactly* what is wrong:  you have no
table called 'user_tests' in the database that your model SiteTest is
trying to use.

I am not of the opinion that PHP and CakePHP spits out
hard-to-diagnose error messages.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-18 Thread bhushan A

hey thanks amit... it worked but not its giving following error.
Error:  Database table user_tests for model SiteTest was not found.
what to do? please help


On Apr 18, 10:45 am, "Amit Badkas" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 18, 2008 at 10:54 AM, bhushan A <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > I have followed the steps given in  "http://bakery.cakephp.org/
> > articles/view/testing-models-with-cakephp-1-2-test-suite"
> > link. But
> > still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/
> > models/user.test.php' I am putting my user.test.php's code here.
> > Please let me know what i am missing.
>
> >  > App::import('User','User');
>
> - You need to do App::import('Model', 'User'); here
>
> --
> Regards,
> Amit
>
> http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-17 Thread Amit Badkas
On Fri, Apr 18, 2008 at 10:54 AM, bhushan A <[EMAIL PROTECTED]>
wrote:

>
> I have followed the steps given in  "http://bakery.cakephp.org/
> articles/view/testing-models-with-cakephp-1-2-test-suite"
> link. But
> still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/
> models/user.test.php' I am putting my user.test.php's code here.
> Please let me know what i am missing.
>
>  App::import('User','User');

- You need to do App::import('Model', 'User'); here



-- 
Regards,
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



testing in cakephp 1.2-Bug-Class 'Usel' Not found

2008-04-17 Thread bhushan A

I have followed the steps given in  "http://bakery.cakephp.org/
articles/view/testing-models-with-cakephp-1-2-test-suite" link. But
still I am gettng 'Fatal error: Class 'User' not found in /tests/cases/
models/user.test.php' I am putting my user.test.php's code here.
Please let me know what i am missing.

UserTest =& new UserTest ();

$result = $this->UserTest ->inactive(array('id', 'name'));
$expected = array(
array('UserTest ' => array( 'id' => 1, 'name' => 'User Communities' ))

);

$this->assertEqual($result, $expected);
}
}
?>


Please reply. Waiting for your reply.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---