http://apigen.juzna.cz/doc/sebastianbergmann/phpunit/function-assertInstanceOf.html
I think you are using this function wrong. Try:
$this->assertInstanceOf('User', $user);
http://apigen.juzna.cz/doc/sebastianbergmann/phpunit/function-assertInstanceOf.html
I think you are using this function wrong. Try:
$this->assertInstanceOf('User', $user);