diff --git a/behat.yml.dist b/behat.yml.dist index 10ac80fb..c766ec65 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -4,19 +4,25 @@ imports: default: extensions: - Lakion\Behat\MinkDebugExtension: + DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~ + + FriendsOfBehat\MinkDebugExtension: directory: etc/build clean_start: false screenshot: true Behat\MinkExtension: files_path: "%paths.base%/vendor/sylius/sylius/src/Sylius/Behat/Resources/fixtures/" - base_url: "http://localhost:8080/" + base_url: "https://127.0.0.1:8080/" default_session: symfony - javascript_session: chrome + javascript_session: chrome_headless sessions: symfony: symfony: ~ + chrome_headless: + chrome: + api_url: http://127.0.0.1:9222 + validate_certificate: false chrome: selenium2: browser: chrome diff --git a/composer.json b/composer.json index 093b8a69..fcac8896 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "knplabs/knp-menu": "^3.2", "knplabs/knp-snappy": "^1.2", "knplabs/knp-snappy-bundle": "^1.7", + "sylius/mailer-bundle": "^1.8 || ^2.0", "sylius/resource-bundle": "^1.10", "symfony/config": "^5.4 || ^6.0", "symfony/console": "^5.4 || ^6.0", @@ -32,11 +33,11 @@ "webmozart/assert": "^1.10" }, "require-dev": { - "doctrine/doctrine-bundle": "^1.12 || ^2.0", "behat/behat": "^3.6.1", "behat/mink-selenium2-driver": "^1.4", "dmore/behat-chrome-extension": "^1.3", "dmore/chrome-mink-driver": "^2.7", + "doctrine/doctrine-bundle": "^1.12 || ^2.0", "friends-of-behat/mink": "^1.8", "friends-of-behat/mink-browserkit-driver": "^1.4", "friends-of-behat/mink-debug-extension": "^2.0.0", @@ -46,13 +47,14 @@ "friends-of-behat/symfony-extension": "^2.1", "friends-of-behat/variadic-extension": "^1.3", "matthiasnoback/symfony-dependency-injection-test": "^4.3", - "sylius-labs/coding-standard": "^4.2", "phpspec/phpspec": "^7.4", "phpunit/phpunit": "^9.6", + "sylius-labs/coding-standard": "^4.2", "sylius/sylius": "^1.12", "symfony/debug-bundle": "^5.4 || ^6.0", "symfony/dotenv": "^5.4 || ^6.0", "symfony/intl": "^5.4 || ^6.0", + "symfony/mailer": "^5.4 || ^6.0", "symfony/proxy-manager-bridge": "^5.4 || ^6.0", "symfony/web-profiler-bundle": "^5.4 || ^6.0", "vimeo/psalm": "^5.15" diff --git a/tests/Security/GiftCardVoterTest.php b/tests/Security/GiftCardVoterTest.php index 3c457930..1ebb3134 100644 --- a/tests/Security/GiftCardVoterTest.php +++ b/tests/Security/GiftCardVoterTest.php @@ -20,7 +20,7 @@ public function testAdminCanSeeAllGiftCards(): void $giftCard = new GiftCard(); $voter = new GiftCardVoter(); $user = new AdminUser(); - $token = new UsernamePasswordToken($user, 'credentials', 'memory'); + $token = new UsernamePasswordToken($user, 'app'); $this->assertSame( Voter::ACCESS_GRANTED, @@ -38,7 +38,7 @@ public function testUsersCanSeeTheirGiftCards(): void $giftCard->setCustomer($customer); - $token = new UsernamePasswordToken($user, 'credentials', 'memory'); + $token = new UsernamePasswordToken($user, 'app'); $this->assertSame( Voter::ACCESS_GRANTED, @@ -54,7 +54,7 @@ public function testUsersCanSeeAnonymousGiftCards(): void $customer = new Customer(); $user->setCustomer($customer); - $token = new UsernamePasswordToken($user, 'credentials', 'memory'); + $token = new UsernamePasswordToken($user, 'app'); $this->assertSame( Voter::ACCESS_GRANTED, @@ -73,7 +73,7 @@ public function testUsersCanNotSeeOtherGiftCards(): void $customer2 = new Customer(); $giftCard->setCustomer($customer2); - $token = new UsernamePasswordToken($user, 'credentials', 'memory'); + $token = new UsernamePasswordToken($user, 'app'); $this->assertSame( Voter::ACCESS_DENIED,