Skip to content

Commit 2e8216e

Browse files
committed
Add testApplication
1 parent 3b5a0c7 commit 2e8216e

98 files changed

Lines changed: 48 additions & 995 deletions

File tree

Some content is hidden

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

.github/workflows/build.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ jobs:
5959
continue-on-error: true
6060

6161
- name: "Lint yaml files"
62-
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)"
62+
run: "vendor/bin/console lint:yaml src/Resources"
6363

6464
- name: "Lint twig files"
65-
run: "(cd tests/Application && bin/console lint:twig ../../src/Resources)"
65+
run: "vendor/bin/console lint:twig src/Resources"
6666

6767
dependency-analysis:
6868
name: "Dependency Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"
@@ -238,16 +238,16 @@ jobs:
238238
dependency-versions: "${{ matrix.dependencies }}"
239239

240240
- name: "Lint container"
241-
run: "(cd tests/Application && bin/console lint:container)"
241+
run: "vendor/bin/console lint:container"
242242

243243
- name: "Create database"
244-
run: "(cd tests/Application && bin/console doctrine:database:create)"
244+
run: "vendor/bin/console doctrine:database:create"
245245

246246
- name: "Create database schema"
247-
run: "(cd tests/Application && bin/console doctrine:schema:create)"
247+
run: "vendor/bin/console doctrine:schema:create"
248248

249249
- name: "Validate Doctrine mapping"
250-
run: "(cd tests/Application && bin/console doctrine:schema:validate)"
250+
run: "vendor/bin/console doctrine:schema:validate"
251251

252252
mutation-tests:
253253
name: "Mutation tests"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
/.build/
2+
/var/
23
/vendor/
34
/node_modules/
45
/composer.lock
56

6-
/tests/Application/yarn.lock
7+
/tests/TestApplication/.env.local
8+
/tests/TestApplication/.env.*.local
79

810
/.phpunit.result.cache
911

tests/Application/config/api_platform/.gitignore renamed to assets/admin/entrypoint.js

File renamed without changes.

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"psalm/plugin-phpunit": "^0.18",
4646
"setono/code-quality-pack": "^2.7",
4747
"sylius/sylius": "^1.14",
48+
"sylius/test-application": "^1.14.0@alpha",
4849
"symfony/debug-bundle": "^5.4 || ^6.4 || ^7.0",
4950
"symfony/dotenv": "^5.4 || ^6.4 || ^7.0",
5051
"symfony/intl": "^5.4 || ^6.4 || ^7.0",
@@ -62,7 +63,8 @@
6263
},
6364
"autoload-dev": {
6465
"psr-4": {
65-
"Setono\\SyliusTermsPlugin\\Tests\\": "tests/"
66+
"Setono\\SyliusTermsPlugin\\Tests\\": "tests/",
67+
"Tests\\Setono\\SyliusTermsPlugin\\": "tests/TestApplication/src"
6668
},
6769
"classmap": [
6870
"tests/Application/Kernel.php"
@@ -73,7 +75,9 @@
7375
"dealerdirect/phpcodesniffer-composer-installer": false,
7476
"ergebnis/composer-normalize": true,
7577
"infection/extension-installer": true,
76-
"symfony/thanks": false
78+
"symfony/thanks": false,
79+
"symfony/runtime": true,
80+
"symfony/flex": true
7781
},
7882
"sort-packages": true
7983
},
@@ -82,5 +86,8 @@
8286
"check-style": "ecs check",
8387
"fix-style": "ecs check --fix",
8488
"phpunit": "phpunit"
89+
},
90+
"extra": {
91+
"public-dir": "vendor/sylius/test-application/public"
8592
}
8693
}

node_modules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tests/Application/node_modules
1+
vendor/sylius/test-application/node_modules

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" colors="true"
4-
bootstrap="tests/Application/config/bootstrap.php">
4+
bootstrap="vendor/sylius/test-application/config/bootstrap.php">
55
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
66
<include>
77
<directory suffix=".php">src/</directory>
@@ -13,6 +13,7 @@
1313
</testsuite>
1414
</testsuites>
1515
<php>
16+
<env name="KERNEL_CLASS" value="Sylius\TestApplication\Kernel" />
1617
<env name="APP_ENV" value="test"/>
1718
<env name="SHELL_VERBOSITY" value="-1"/>
1819
</php>

src/Resources/config/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
imports:
2+
- { resource: "app/fixtures.yaml" }

tests/Application/.env

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

tests/Application/.env.test

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

0 commit comments

Comments
 (0)