vendredi 1 septembre 2017

Cannot Use json Method in Laravel 5.0

In one of the tutorial of PHPUnit testing that I am learning, the tutor uses

    $this->json('POST', "/images/{$image->id}/purchase", [
        'email' => 'abc@gmail.com',
    ]);

When I tried to use the same code to implement in my testing, I get exception error like

BadMethodCallException: The 'json' method does not exist.

C:\wamp64\www\RealTesting\vendor\laracasts\integrated\src\Extensions\IntegrationTrait.php:715

I searched in the Laravel 5.0 documentation, I cannot find the json function. Where did I go wrong? Is there any way to access json function?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire