Add test coverage to cehck the authorization state of client resources

This commit is contained in:
Dane Everitt 2021-01-19 21:20:55 -08:00
parent e8dcd30e0c
commit 63f945bc3a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 369 additions and 3 deletions

View file

@ -3,6 +3,8 @@
namespace Pterodactyl\Tests\Integration;
use Illuminate\Testing\Assert as PHPUnit;
use Pterodactyl\Exceptions\DisplayException;
use Illuminate\Validation\ValidationException;
use Illuminate\Testing\TestResponse as IlluminateTestResponse;
class TestResponse extends IlluminateTestResponse
@ -23,7 +25,7 @@ class TestResponse extends IlluminateTestResponse
// to fail so that debugging isn't such a nightmare.
if ($actual !== $status && $status !== 500) {
$this->dump();
if (! is_null($this->exception)) {
if (! is_null($this->exception) && ! $this->exception instanceof DisplayException && ! $this->exception instanceof ValidationException) {
dump($this->exception);
}
}