/** * Test that you can access the responder service from the helper methid. * * @test */ public function youCanAccessThroughHelperMethod() { // Arrange... $responder = responder(); // Assert... $this->assertInstanceOf(Responder::class, $responder); }
/** * Test that you can generate error responses using the helper method. * * @test */ public function youCanMakeErrorResponsesUsingHelperMethod() { // Arrange... $responder = $this->mockResponder(); // Expect... $responder->shouldReceive('error')->with('test_error', 400, 'Test error.')->once(); // Act... responder()->error('test_error', 400, 'Test error.'); }
public function test_responder() { $this->assertNotEquals('hola', responder(2)); }