Skip to content

Commit 884414d

Browse files
committed
[Maintenance] Add TestApplication
1 parent b378826 commit 884414d

File tree

83 files changed

+44
-971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+44
-971
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474

7575
-
7676
name: Run webserver
77-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
77+
run: (symfony server:start --port=8080 --dir=public --daemon)
7878

7979
-
8080
name: Get Composer cache directory
@@ -129,35 +129,35 @@ jobs:
129129
130130
-
131131
name: Install JS dependencies
132-
run: (cd tests/Application && yarn install)
132+
run: (cd vendor/sylius/test-application && yarn install)
133133

134134
-
135135
name: Prepare test application database
136136
run: |
137-
(cd tests/Application && bin/console doctrine:database:create -vvv)
138-
(cd tests/Application && bin/console doctrine:schema:create -vvv)
137+
(vendor/bin/console doctrine:database:create -vvv)
138+
(vendor/bin/console doctrine:schema:create -vvv)
139139
140140
-
141141
name: Prepare test application assets
142142
run: |
143-
(cd tests/Application && bin/console assets:install public -vvv)
144-
(cd tests/Application && yarn build:prod)
143+
(cd vendor/bin/console assets:install public -vvv)
144+
(cd vendor/sylius/test-application && yarn build:prod)
145145
146146
-
147147
name: Prepare test application cache
148-
run: (cd tests/Application && bin/console cache:warmup -vvv)
148+
run: (cd vendor/bin/console cache:warmup -vvv)
149149

150150
-
151151
name: Load fixtures in test application
152-
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
152+
run: (cd vendor/bin/console sylius:fixtures:load -n)
153153

154154
-
155155
name: Validate composer.json
156156
run: composer validate --ansi --strict
157157

158158
-
159159
name: Validate database schema
160-
run: (cd tests/Application && bin/console doctrine:schema:validate)
160+
run: (cd vendor/bin/console doctrine:schema:validate)
161161

162162
-
163163
name: Run PHPStan

assets/admin/controllers.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"controllers": [],
3+
"entrypoints": []
4+
}

assets/shop/controllers.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"controllers": [],
3+
"entrypoints": []
4+
}

bin/create_node_symlink.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

composer.json

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"sylius-labs/coding-standard": "^4.4",
3434
"sylius-labs/suite-tags-extension": "~0.2",
3535
"sylius/sylius-rector": "^2.0",
36+
"sylius/test-application": "~2.0.0",
3637
"symfony/browser-kit": "^6.4 || ^7.1",
3738
"symfony/debug-bundle": "^6.4 || ^7.1",
3839
"symfony/dotenv": "^6.4 || ^7.1",
@@ -57,33 +58,16 @@
5758
},
5859
"symfony": {
5960
"require": "^6.4"
60-
}
61+
},
62+
"public-dir": "vendor/sylius/test-application/public"
63+
6164
},
6265
"autoload": {
6366
"psr-4": {
6467
"Acme\\SyliusExamplePlugin\\": "src/",
6568
"Tests\\Acme\\SyliusExamplePlugin\\": "tests/"
6669
}
6770
},
68-
"autoload-dev": {
69-
"classmap": [
70-
"tests/Application/Kernel.php"
71-
]
72-
},
73-
"scripts": {
74-
"post-install-cmd": [
75-
"php bin/create_node_symlink.php"
76-
],
77-
"post-update-cmd": [
78-
"php bin/create_node_symlink.php"
79-
],
80-
"post-create-project-cmd": [
81-
"php bin/create_node_symlink.php"
82-
],
83-
"auto-scripts": {
84-
"cache:clear": "symfony-cmd",
85-
"assets:install %PUBLIC_DIR%": "symfony-cmd",
86-
"COMPOSER_AUDIT_ABANDONED=ignore composer audit": "script"
87-
}
88-
}
71+
"minimum-stability": "dev",
72+
"prefer-stable": true
8973
}

src/AcmeSyliusExamplePlugin.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
namespace Acme\SyliusExamplePlugin;
66

77
use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait;
8+
use Symfony\Component\DependencyInjection\ContainerBuilder;
89
use Symfony\Component\HttpKernel\Bundle\Bundle;
910

1011
final class AcmeSyliusExamplePlugin extends Bundle
1112
{
1213
use SyliusPluginTrait;
1314

15+
public function build(ContainerBuilder $container): void
16+
{
17+
parent::build($container);
18+
}
19+
1420
public function getPath(): string
1521
{
1622
return \dirname(__DIR__);

tests/Application/.env

Lines changed: 0 additions & 35 deletions
This file was deleted.

tests/Application/.env.test

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/Application/.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/Application/.gitignore

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)