Test failed asserting that '{"error":{"message":"Book not found"}}' does not match PCRE pattern "/Book not found/".
Why is this pattern not matching the content string?
<?php
namespace Tests\App\Http\Controllers;
use TestCase;
class BooksControllerTest extends TestCase
{
/** @test **/
public function show_route_should_not_match_an_invalid_route()
{
$this->get('/books/this-is-invalid');
$this->assertNotRegExp(
'/Book not found/',
$this->response->getContent(),
'BooksController@show route matching when it should not.'
);
}
}