build(deps): add symfony/test-pack
This commit is contained in:
parent
b7ef5c69b7
commit
415711e853
6
.env.test
Normal file
6
.env.test
Normal file
|
@ -0,0 +1,6 @@
|
|||
# define your env variables for the test env here
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||
PANTHER_APP_ENV=panther
|
||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -15,3 +15,13 @@
|
|||
###< squizlabs/php_codesniffer ###
|
||||
|
||||
/bin/
|
||||
|
||||
###> symfony/phpunit-bridge ###
|
||||
.phpunit.result.cache
|
||||
/phpunit.xml
|
||||
###< symfony/phpunit-bridge ###
|
||||
|
||||
###> phpunit/phpunit ###
|
||||
/phpunit.xml
|
||||
.phpunit.result.cache
|
||||
###< phpunit/phpunit ###
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2",
|
||||
"symfony/maker-bundle": "^1.15"
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"symfony/browser-kit": "5.0.*",
|
||||
"symfony/css-selector": "5.0.*",
|
||||
"symfony/maker-bundle": "^1.15",
|
||||
"symfony/phpunit-bridge": "^6.0"
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": {
|
||||
|
|
2127
composer.lock
generated
2127
composer.lock
generated
File diff suppressed because it is too large
Load diff
42
phpunit.xml.dist
Normal file
42
phpunit.xml.dist
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
convertDeprecationsToExceptions="false"
|
||||
>
|
||||
<php>
|
||||
<ini name="display_errors" value="1" />
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<server name="APP_ENV" value="test" force="true" />
|
||||
<server name="SHELL_VERBOSITY" value="-1" />
|
||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Project Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
|
||||
<!-- Run `composer require symfony/panther` before enabling this extension -->
|
||||
<!--
|
||||
<extensions>
|
||||
<extension class="Symfony\Component\Panther\ServerExtension" />
|
||||
</extensions>
|
||||
-->
|
||||
</phpunit>
|
131
symfony.lock
131
symfony.lock
|
@ -5,12 +5,65 @@
|
|||
"doctrine/inflector": {
|
||||
"version": "1.3.1"
|
||||
},
|
||||
"doctrine/instantiator": {
|
||||
"version": "1.4.0"
|
||||
},
|
||||
"myclabs/deep-copy": {
|
||||
"version": "1.10.2"
|
||||
},
|
||||
"nikic/php-parser": {
|
||||
"version": "v4.4.0"
|
||||
},
|
||||
"phar-io/manifest": {
|
||||
"version": "2.0.3"
|
||||
},
|
||||
"phar-io/version": {
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"php": {
|
||||
"version": "7.4"
|
||||
},
|
||||
"phpdocumentor/reflection-common": {
|
||||
"version": "2.2.0"
|
||||
},
|
||||
"phpdocumentor/reflection-docblock": {
|
||||
"version": "5.3.0"
|
||||
},
|
||||
"phpdocumentor/type-resolver": {
|
||||
"version": "1.6.0"
|
||||
},
|
||||
"phpspec/prophecy": {
|
||||
"version": "v1.15.0"
|
||||
},
|
||||
"phpunit/php-code-coverage": {
|
||||
"version": "9.2.10"
|
||||
},
|
||||
"phpunit/php-file-iterator": {
|
||||
"version": "3.0.6"
|
||||
},
|
||||
"phpunit/php-invoker": {
|
||||
"version": "3.1.1"
|
||||
},
|
||||
"phpunit/php-text-template": {
|
||||
"version": "2.0.4"
|
||||
},
|
||||
"phpunit/php-timer": {
|
||||
"version": "5.0.3"
|
||||
},
|
||||
"phpunit/phpunit": {
|
||||
"version": "9.5",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "9.3",
|
||||
"ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
|
@ -23,6 +76,54 @@
|
|||
"psr/log": {
|
||||
"version": "1.1.3"
|
||||
},
|
||||
"sebastian/cli-parser": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
"sebastian/code-unit": {
|
||||
"version": "1.0.8"
|
||||
},
|
||||
"sebastian/code-unit-reverse-lookup": {
|
||||
"version": "2.0.3"
|
||||
},
|
||||
"sebastian/comparator": {
|
||||
"version": "4.0.6"
|
||||
},
|
||||
"sebastian/complexity": {
|
||||
"version": "2.0.2"
|
||||
},
|
||||
"sebastian/diff": {
|
||||
"version": "4.0.4"
|
||||
},
|
||||
"sebastian/environment": {
|
||||
"version": "5.1.3"
|
||||
},
|
||||
"sebastian/exporter": {
|
||||
"version": "4.0.4"
|
||||
},
|
||||
"sebastian/global-state": {
|
||||
"version": "5.0.3"
|
||||
},
|
||||
"sebastian/lines-of-code": {
|
||||
"version": "1.0.3"
|
||||
},
|
||||
"sebastian/object-enumerator": {
|
||||
"version": "4.0.4"
|
||||
},
|
||||
"sebastian/object-reflector": {
|
||||
"version": "2.0.4"
|
||||
},
|
||||
"sebastian/recursion-context": {
|
||||
"version": "4.0.4"
|
||||
},
|
||||
"sebastian/resource-operations": {
|
||||
"version": "3.0.3"
|
||||
},
|
||||
"sebastian/type": {
|
||||
"version": "2.3.4"
|
||||
},
|
||||
"sebastian/version": {
|
||||
"version": "3.0.2"
|
||||
},
|
||||
"squizlabs/php_codesniffer": {
|
||||
"version": "3.0",
|
||||
"recipe": {
|
||||
|
@ -35,6 +136,9 @@
|
|||
"phpcs.xml.dist"
|
||||
]
|
||||
},
|
||||
"symfony/browser-kit": {
|
||||
"version": "v5.0.11"
|
||||
},
|
||||
"symfony/cache": {
|
||||
"version": "v5.0.8"
|
||||
},
|
||||
|
@ -57,9 +161,15 @@
|
|||
"config/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"symfony/css-selector": {
|
||||
"version": "v5.0.11"
|
||||
},
|
||||
"symfony/dependency-injection": {
|
||||
"version": "v5.0.8"
|
||||
},
|
||||
"symfony/dom-crawler": {
|
||||
"version": "v5.0.11"
|
||||
},
|
||||
"symfony/dotenv": {
|
||||
"version": "v5.0.8"
|
||||
},
|
||||
|
@ -134,6 +244,21 @@
|
|||
"symfony/mime": {
|
||||
"version": "v5.0.8"
|
||||
},
|
||||
"symfony/phpunit-bridge": {
|
||||
"version": "6.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.3",
|
||||
"ref": "97cb3dc7b0f39c7cfc4b7553504c9d7b7795de96"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
"bin/phpunit",
|
||||
"phpunit.xml.dist",
|
||||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"symfony/polyfill-intl-idn": {
|
||||
"version": "v1.15.0"
|
||||
},
|
||||
|
@ -169,7 +294,13 @@
|
|||
"symfony/yaml": {
|
||||
"version": "v5.0.8"
|
||||
},
|
||||
"theseer/tokenizer": {
|
||||
"version": "1.2.1"
|
||||
},
|
||||
"tightenco/collect": {
|
||||
"version": "v7.9.2"
|
||||
},
|
||||
"webmozart/assert": {
|
||||
"version": "1.10.0"
|
||||
}
|
||||
}
|
||||
|
|
11
tests/bootstrap.php
Normal file
11
tests/bootstrap.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
|
||||
require dirname(__DIR__).'/config/bootstrap.php';
|
||||
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
}
|
Loading…
Reference in a new issue