mirror of
https://github.com/symfony/recipes.git
synced 2026-09-17 18:16:34 +03:00
125 lines
5.5 KiB
JSON
125 lines
5.5 KiB
JSON
{
|
|
"manifests": {
|
|
"symfony/phpunit-bridge": {
|
|
"manifest": {
|
|
"copy-from-recipe": {
|
|
".env.test": ".env.test",
|
|
"bin/": "%BIN_DIR%/",
|
|
"config/": "%CONFIG_DIR%/",
|
|
"phpunit.xml.dist": "phpunit.xml.dist",
|
|
"tests/": "tests/"
|
|
},
|
|
"gitignore": [
|
|
".phpunit",
|
|
"/phpunit.xml"
|
|
],
|
|
"post-install-output": [
|
|
"<bg=blue;fg=white> </>",
|
|
"<bg=blue;fg=white> How to test? </>",
|
|
"<bg=blue;fg=white> </>",
|
|
"",
|
|
" * <fg=blue>Write</> test cases in the <comment>tests/</> folder",
|
|
" * <fg=blue>Run</> <comment>php bin/phpunit</>"
|
|
]
|
|
},
|
|
"files": {
|
|
".env.test": {
|
|
"contents": [
|
|
"# define your env variables for the test env here",
|
|
"KERNEL_CLASS=App\\\\Kernel",
|
|
"APP_SECRET='s$cretf0rt3st'",
|
|
"SHELL_VERBOSITY=-1",
|
|
"SYMFONY_DEPRECATIONS_HELPER=999999",
|
|
"SYMFONY_PHPUNIT_VERSION=6.5",
|
|
""
|
|
],
|
|
"executable": false
|
|
},
|
|
"bin/phpunit": {
|
|
"contents": [
|
|
"#!/usr/bin/env php",
|
|
"<?php",
|
|
"",
|
|
"if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {",
|
|
" echo \"Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\\n\";",
|
|
" exit(1);",
|
|
"}",
|
|
"",
|
|
"$classLoader = require dirname(__DIR__).'/vendor/autoload.php';",
|
|
"App\\Kernel::bootstrapEnv('test');",
|
|
"$classLoader->unregister();",
|
|
"",
|
|
"if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {",
|
|
" putenv('SYMFONY_PHPUNIT_REMOVE=symfony/yaml');",
|
|
"}",
|
|
"if (false === getenv('SYMFONY_PHPUNIT_DIR')) {",
|
|
" putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');",
|
|
"}",
|
|
"",
|
|
"require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';",
|
|
""
|
|
],
|
|
"executable": true
|
|
},
|
|
"config/services_test.yaml": {
|
|
"contents": [
|
|
"services:",
|
|
" _defaults:",
|
|
" public: true",
|
|
"",
|
|
" # If you need to access services in a test, create an alias",
|
|
" # and then fetch that alias from the container. As a convention,",
|
|
" # aliases are prefixed with test. For example:",
|
|
" #",
|
|
" # test.App\\Service\\MyService: '@App\\Service\\MyService'",
|
|
""
|
|
],
|
|
"executable": false
|
|
},
|
|
"phpunit.xml.dist": {
|
|
"contents": [
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
|
|
"",
|
|
"<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->",
|
|
"<phpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",
|
|
" xsi:noNamespaceSchemaLocation=\"http://schema.phpunit.de/6.5/phpunit.xsd\"",
|
|
" backupGlobals=\"false\"",
|
|
" colors=\"true\"",
|
|
" bootstrap=\"vendor/autoload.php\"",
|
|
">",
|
|
" <php>",
|
|
" <ini name=\"error_reporting\" value=\"-1\" />",
|
|
" </php>",
|
|
"",
|
|
" <testsuites>",
|
|
" <testsuite name=\"Project Test Suite\">",
|
|
" <directory>tests</directory>",
|
|
" </testsuite>",
|
|
" </testsuites>",
|
|
"",
|
|
" <filter>",
|
|
" <whitelist>",
|
|
" <directory>src</directory>",
|
|
" </whitelist>",
|
|
" </filter>",
|
|
"",
|
|
" <listeners>",
|
|
" <listener class=\"Symfony\\Bridge\\PhpUnit\\SymfonyTestsListener\" />",
|
|
" </listeners>",
|
|
"</phpunit>",
|
|
""
|
|
],
|
|
"executable": false
|
|
},
|
|
"tests/.gitignore": {
|
|
"contents": [
|
|
""
|
|
],
|
|
"executable": false
|
|
}
|
|
},
|
|
"ref": "949c2ef159d6b28cf691a117ac60863eda2817ea"
|
|
}
|
|
}
|
|
}
|