+
+ public function test_access_to_non_existing_image_location_provides_404_response()
+ {
+ $resp = $this->actingAs($this->users->viewer())->get('/uploads/images/gallery/2021-05/anonexistingimage.png');
+ $resp->assertStatus(404);
+ $resp->assertSeeText('Image Not Found');
+ }
+
+ public function test_posts_above_php_limit_shows_friendly_error()
+ {
+ // Fake super large JSON request
+ $resp = $this->asEditor()->call('GET', '/books', [], [], [], [
+ 'CONTENT_LENGTH' => '10000000000',
+ 'HTTP_ACCEPT' => 'application/json',
+ ]);
+
+ $resp->assertStatus(413);
+ $resp->assertJson(['error' => 'The server cannot receive the provided amount of data. Try again with less data or a smaller file.']);
+ }
+}