diff --git a/Tests/Functional/AbstractSaferpayTest.php b/Tests/Functional/AbstractSaferpayTest.php index 1fec448..dcfacaa 100644 --- a/Tests/Functional/AbstractSaferpayTest.php +++ b/Tests/Functional/AbstractSaferpayTest.php @@ -23,6 +23,7 @@ use Payum\Core\Storage\StorageInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\BrowserKit\Exception\BadMethodCallException; +use Symfony\Component\BrowserKit\Response; use Symfony\Component\DomCrawler\Crawler; abstract class AbstractSaferpayTest extends TestCase @@ -173,8 +174,9 @@ protected function getThroughCheckout(string $url, array $formData, string $acti } else { $this->client->submitForm('SubmitToNext', $formData); } + /** @var Response $response */ $response = $this->client->getResponse(); - if ($response->getStatus() === 302) { + if ($response->getStatusCode() === 302) { $location = $response->getHeader('Location'); if (0 === strpos($location, self::HOST)) { return $location; @@ -184,28 +186,28 @@ protected function getThroughCheckout(string $url, array $formData, string $acti } if (false !== strpos($this->client->getCrawler()->getUri(), '/VT2/mpp/PaymentDataEntry/Index')) { - self::assertSame(200, $this->client->getResponse()->getStatus()); + self::assertSame(200, $this->client->getResponse()->getStatusCode()); $this->client->submitForm( $action === 'submit' ? 'Buy' : 'Cancel'); - self::assertSame(302, $this->client->getResponse()->getStatus()); + self::assertSame(302, $this->client->getResponse()->getStatusCode()); $this->client->followRedirect(); } if ( false !== strpos($this->client->getCrawler()->getUri(), '/VT2/mpp/ThreeDS/Index') || false !== strpos($this->client->getCrawler()->getUri(), '/VT2/api/ThreeDs') ) { - self::assertSame(200, $this->client->getResponse()->getStatus()); + self::assertSame(200, $this->client->getResponse()->getStatusCode()); $this->submitForm('[type="submit"]'); - self::assertSame(200, $this->client->getResponse()->getStatus()); + self::assertSame(200, $this->client->getResponse()->getStatusCode()); $this->client->submitForm($action === 'submit' ? 'Submit' : 'Cancel'); - self::assertSame(200, $this->client->getResponse()->getStatus()); + self::assertSame(200, $this->client->getResponse()->getStatusCode()); $this->client->submitForm('Submit'); - self::assertSame(200, $this->client->getResponse()->getStatus()); + self::assertSame(200, $this->client->getResponse()->getStatusCode()); $this->clickLink('a.btn-next'); $response = $this->client->getResponse(); - self::assertSame(302, $response->getStatus()); + self::assertSame(302, $response->getStatusCode()); $location = $response->getHeader('Location'); if (0 === strpos($location, self::HOST)) { return $location; @@ -216,7 +218,7 @@ protected function getThroughCheckout(string $url, array $formData, string $acti $this->client->submitForm('Cancel'); $response = $this->client->getResponse(); - self::assertSame(302, $response->getStatus()); + self::assertSame(302, $response->getStatusCode()); $location = $response->getHeader('Location'); if (0 === strpos($location, self::HOST)) { return $location; diff --git a/composer.json b/composer.json index 76ac530..a026b02 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "payum/core": "^1.5" }, "require-dev": { - "fabpot/goutte": "^3.2,<3.3", + "fabpot/goutte": "^3.3", "php-http/guzzle6-adapter": "^2.0", "phpunit/phpunit": "^5.7" },