Require test pack recipe

This commit is contained in:
Oliver Davies 2019-02-13 19:54:41 +00:00
parent 8c686443b5
commit 390904c2ef
8 changed files with 531 additions and 1 deletions

4
.env.test Normal file
View file

@ -0,0 +1,4 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='s$cretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999

5
.gitignore vendored
View file

@ -7,3 +7,8 @@
/var/
/vendor/
###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###

19
bin/phpunit Executable file
View file

@ -0,0 +1,19 @@
#!/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);
}
if (false === getenv('SYMFONY_PHPUNIT_VERSION')) {
putenv('SYMFONY_PHPUNIT_VERSION=6.5');
}
if (false === getenv('SYMFONY_PHPUNIT_REMOVE')) {
putenv('SYMFONY_PHPUNIT_REMOVE=');
}
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';

View file

@ -59,6 +59,7 @@
},
"require-dev": {
"symfony/maker-bundle": "^1.11",
"symfony/test-pack": "^1.0",
"symfony/var-dumper": "4.2.*"
}
}

442
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "35b114429a6170678ae1592190a9808e",
"content-hash": "4d9908dc07053520ed95d1740475d9c5",
"packages": [
{
"name": "guzzlehttp/guzzle",
@ -1731,6 +1731,66 @@
],
"time": "2018-01-09T20:05:19+00:00"
},
{
"name": "facebook/webdriver",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/facebook/php-webdriver.git",
"reference": "bd8c740097eb9f2fc3735250fc1912bc811a954e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facebook/php-webdriver/zipball/bd8c740097eb9f2fc3735250fc1912bc811a954e",
"reference": "bd8c740097eb9f2fc3735250fc1912bc811a954e",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-zip": "*",
"php": "^5.6 || ~7.0",
"symfony/process": "^2.8 || ^3.1 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"php-coveralls/php-coveralls": "^2.0",
"php-mock/php-mock-phpunit": "^1.1",
"phpunit/phpunit": "^5.7",
"sebastian/environment": "^1.3.4 || ^2.0 || ^3.0",
"squizlabs/php_codesniffer": "^2.6",
"symfony/var-dumper": "^3.3 || ^4.0"
},
"suggest": {
"ext-SimpleXML": "For Firefox profile creation"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-community": "1.5-dev"
}
},
"autoload": {
"psr-4": {
"Facebook\\WebDriver\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"description": "A PHP client for Selenium WebDriver",
"homepage": "https://github.com/facebook/php-webdriver",
"keywords": [
"facebook",
"php",
"selenium",
"webdriver"
],
"time": "2018-05-16T17:37:13+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.2.0",
@ -1782,6 +1842,173 @@
],
"time": "2019-01-12T16:31:37+00:00"
},
{
"name": "symfony/browser-kit",
"version": "v4.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "ee4462581eb54bf34b746e4a5d522a4f21620160"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/ee4462581eb54bf34b746e4a5d522a4f21620160",
"reference": "ee4462581eb54bf34b746e4a5d522a4f21620160",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/dom-crawler": "~3.4|~4.0"
},
"require-dev": {
"symfony/css-selector": "~3.4|~4.0",
"symfony/process": "~3.4|~4.0"
},
"suggest": {
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\BrowserKit\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"time": "2019-01-16T21:31:25+00:00"
},
{
"name": "symfony/css-selector",
"version": "v4.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "48eddf66950fa57996e1be4a55916d65c10c604a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/48eddf66950fa57996e1be4a55916d65c10c604a",
"reference": "48eddf66950fa57996e1be4a55916d65c10c604a",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\CssSelector\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jean-François Simon",
"email": "jeanfrancois.simon@sensiolabs.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"time": "2019-01-16T20:31:39+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v4.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "d8476760b04cdf7b499c8718aa437c20a9155103"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/d8476760b04cdf7b499c8718aa437c20a9155103",
"reference": "d8476760b04cdf7b499c8718aa437c20a9155103",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"symfony/css-selector": "~3.4|~4.0"
},
"suggest": {
"symfony/css-selector": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\DomCrawler\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"time": "2019-01-16T20:35:37+00:00"
},
{
"name": "symfony/maker-bundle",
"version": "v1.11.3",
@ -1848,6 +2075,141 @@
],
"time": "2019-01-17T02:02:27+00:00"
},
{
"name": "symfony/panther",
"version": "v0.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/panther.git",
"reference": "d67f9dbcac173150fe00673e6564b3482762c615"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/panther/zipball/d67f9dbcac173150fe00673e6564b3482762c615",
"reference": "d67f9dbcac173150fe00673e6564b3482762c615",
"shasum": ""
},
"require": {
"facebook/webdriver": "^1.5",
"php": ">=7.1",
"symfony/browser-kit": "^4.0",
"symfony/polyfill-php72": "^1.9",
"symfony/process": "^3.4 || ^4.0"
},
"conflict": {
"symfony/browser-kit": "4.1.0"
},
"require-dev": {
"fabpot/goutte": "^3.2.3",
"guzzlehttp/guzzle": "^6.3",
"phpunit/phpunit": "^7.0",
"symfony/css-selector": "^3.4 || ^4.0",
"symfony/framework-bundle": "^3.4 || ^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Panther\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Kévin Dunglas",
"email": "dunglas@gmail.com",
"homepage": "https://dunglas.fr"
}
],
"description": "A browser testing and web scraping library for PHP and Symfony.",
"homepage": "https://dunglas.fr",
"keywords": [
"e2e",
"scraping",
"selenium",
"symfony",
"testing",
"webdriver"
],
"time": "2018-09-26T10:35:52+00:00"
},
{
"name": "symfony/phpunit-bridge",
"version": "v4.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git",
"reference": "4ea7d80a7512ddc41d5af598978edcd395140edc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/4ea7d80a7512ddc41d5af598978edcd395140edc",
"reference": "4ea7d80a7512ddc41d5af598978edcd395140edc",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
"suggest": {
"ext-zip": "Zip support is required when using bin/simple-phpunit",
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"bin": [
"bin/simple-phpunit"
],
"type": "symfony-bridge",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
},
"thanks": {
"name": "phpunit/phpunit",
"url": "https://github.com/sebastianbergmann/phpunit"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Bridge\\PhpUnit\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony PHPUnit Bridge",
"homepage": "https://symfony.com",
"time": "2019-01-24T21:39:51+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.10.0",
@ -1903,6 +2265,84 @@
],
"time": "2018-09-21T13:07:52+00:00"
},
{
"name": "symfony/process",
"version": "v4.2.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/6c05edb11fbeff9e2b324b4270ecb17911a8b7ad",
"reference": "6c05edb11fbeff9e2b324b4270ecb17911a8b7ad",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Process\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2019-01-24T22:05:03+00:00"
},
{
"name": "symfony/test-pack",
"version": "v1.0.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/test-pack.git",
"reference": "1792b80cc2da5310e84afa983682b71dfc409d17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/test-pack/zipball/1792b80cc2da5310e84afa983682b71dfc409d17",
"reference": "1792b80cc2da5310e84afa983682b71dfc409d17",
"shasum": ""
},
"require": {
"php": "^7.0",
"symfony/browser-kit": "*",
"symfony/css-selector": "*",
"symfony/panther": "*",
"symfony/phpunit-bridge": "*"
},
"type": "symfony-pack",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A pack for functional and end-to-end testing within a Symfony app",
"time": "2018-12-10T12:13:08+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.2.3",

31
phpunit.xml.dist Normal file
View file

@ -0,0 +1,31 @@
<?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="config/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="APP_ENV" value="test" />
<env name="SHELL_VERBOSITY" 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>

View file

@ -2,6 +2,9 @@
"doctrine/inflector": {
"version": "v1.3.0"
},
"facebook/webdriver": {
"version": "1.6.0"
},
"guzzlehttp/guzzle": {
"version": "6.3.3"
},
@ -32,6 +35,9 @@
"ralouphie/getallheaders": {
"version": "2.0.5"
},
"symfony/browser-kit": {
"version": "v4.2.3"
},
"symfony/cache": {
"version": "v4.2.3"
},
@ -50,12 +56,18 @@
"symfony/contracts": {
"version": "v1.0.2"
},
"symfony/css-selector": {
"version": "v4.2.3"
},
"symfony/debug": {
"version": "v4.2.3"
},
"symfony/dependency-injection": {
"version": "v4.2.3"
},
"symfony/dom-crawler": {
"version": "v4.2.3"
},
"symfony/dotenv": {
"version": "v4.2.3"
},
@ -101,12 +113,27 @@
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
}
},
"symfony/panther": {
"version": "v0.2.0"
},
"symfony/phpunit-bridge": {
"version": "4.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.1",
"ref": "0e548dd90adba18fabd4ef419b14d361fe4d6c74"
}
},
"symfony/polyfill-mbstring": {
"version": "v1.10.0"
},
"symfony/polyfill-php72": {
"version": "v1.10.0"
},
"symfony/process": {
"version": "v4.2.3"
},
"symfony/routing": {
"version": "4.2",
"recipe": {
@ -116,6 +143,9 @@
"ref": "5374e24d508ba8fd6ba9eb15170255fdb778316a"
}
},
"symfony/test-pack": {
"version": "v1.0.5"
},
"symfony/var-dumper": {
"version": "v4.2.3"
},

0
tests/.gitignore vendored Normal file
View file