streamedContent())->getRecords()) ->pluck(0) ->contains($needle) ); return $this; } ); TestResponse::macro( 'assertDontSeeTextInStreamedResponse', function (string $needle) { Assert::assertFalse( collect(Reader::createFromString($this->streamedContent())->getRecords()) ->pluck(0) ->contains($needle) ); return $this; } ); } public function testPermissionRequiredToViewUnacceptedAssetReport() { $this->actingAs(User::factory()->create()) ->get(route('reports/unaccepted_assets')) ->assertForbidden(); } public function testUserCanListUnacceptedAssets() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('reports/unaccepted_assets')) ->assertOk(); } }