Skip to content

Instantly share code, notes, and snippets.

@anaxamaxan
Last active December 8, 2015 09:44
Show Gist options
  • Save anaxamaxan/0c9e20d37bde59842e58 to your computer and use it in GitHub Desktop.
Save anaxamaxan/0c9e20d37bde59842e58 to your computer and use it in GitHub Desktop.
Quick test of a trait method
public function testIsForbiddenResponse()
{
$obj = new class(){
use \App\Http\Controllers\Traits\JsonMessagesTrait;
};
$this->assertEquals(403, $obj->isForbiddenResponse()->getStatusCode());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment