From 8531a1e17ebbba9049e69f993096141ae3a8bb4b Mon Sep 17 00:00:00 2001 From: crynobone Date: Mon, 13 Apr 2015 08:35:56 +0800 Subject: [PATCH] Simplify assertion. Signed-off-by: crynobone --- src/Traits/PHPUnitAssertionsTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Traits/PHPUnitAssertionsTrait.php b/src/Traits/PHPUnitAssertionsTrait.php index 0b8b64b..b9904ed 100644 --- a/src/Traits/PHPUnitAssertionsTrait.php +++ b/src/Traits/PHPUnitAssertionsTrait.php @@ -28,9 +28,9 @@ public function assertResponseOk() */ public function assertResponseStatus($code) { - $actual = $response->getStatusCode(); + $actual = $this->crawler->getStatusCode(); - return PHPUnit::assertEquals($code, $this->crawler->getStatusCode(), "Expected status code {$code}, got {$actual}."); + return PHPUnit::assertEquals($code, $actual, "Expected status code {$code}, got {$actual}."); } /**