getStatusCode(); // Dump the response to the screen before making the assertion which is going // to fail so that debugging isn't such a nightmare. if ($actual !== $status && $status !== 500) { $this->dump(); if (! is_null($this->exception)) { dump($this->exception); } } PHPUnit::assertSame($actual, $status, "Expected status code {$status} but received {$actual}."); return $this; } }