Flugg\Responder\Tests\AccessResponderTest::youCanAccessThroughControllerTrait PHP Méthode

youCanAccessThroughControllerTrait() public méthode

Test that you can access the responder service from the controller trait.
    public function youCanAccessThroughControllerTrait()
    {
        // Arrange...
        $fruit = $this->createModel();
        $controller = $this->createTestController();
        $responder = $this->mockResponder();
        // Act...
        (new $controller())->successAction($fruit);
        // Assert...
        $responder->shouldHaveReceived('success')->with($fruit, null, []);
    }