I need to check if a variable is an object of the User type.
User is my class $user
my object
$this->assertInstanceOf($user,User);
This is not working, I have a use of undefined constant User - assumed 'User'
Thanks in advance for your help
http://apigen.juzna.cz/doc/sebastianbergmann/phpunit/function-assertInstanceOf.html
I think you are using this function wrong. Try:
$this->assertInstanceOf('User', $user);