Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Nov 14, 2023
1 parent 0d824fd commit d4835b7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
12 changes: 9 additions & 3 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions tests/Security/GiftCardVoterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit d4835b7

Please sign in to comment.