Forum

laravel, json, phpu...
 
Notifications
Clear all

laravel, json, phpunit, cant test json response, unicode problems

1 Posty
1 Users
0 Reactions
995 Widok
0
Topic starter

cant assert string

1 Answer
0
Topic starter

maybe temp workaround?

        $response =  $this->json('GET', '/data/ajax/search', ['term' => 'my_term']);
        $text =  print_r(json_decode($response->getContent()),true);
        $this->assertStringContainsString('neeedle search',$text);

Odpowiedź

Author Name

Author Email

Your question *

 
Preview 0 Revisions Saved
Share: