Skip to content

Commit

Permalink
minor #22387 fail when detecting risky tests (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

fail when detecting risky tests

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The `--fail-on-risky` option is available since sebastianbergmann/phpunit@7e06a82 which was first released with PHPUnit 5.2.

Commits
-------

3792ee6 fail when detecting risky tests
  • Loading branch information
fabpot committed Apr 12, 2017
2 parents f478161 + 3792ee6 commit cff1842
Show file tree
Hide file tree
Showing 49 changed files with 98 additions and 6 deletions.
2 changes: 2 additions & 0 deletions phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Doctrine/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Monolog/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/PhpUnit/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/ProxyManager/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/composer.json
Expand Up @@ -22,7 +22,7 @@
"require-dev": {
"symfony/asset": "~2.7",
"symfony/finder": "~2.3",
"symfony/form": "~2.7.25|^2.8.18",
"symfony/form": "~2.7.26|^2.8.19",
"symfony/http-kernel": "~2.3",
"symfony/intl": "~2.3",
"symfony/routing": "~2.2",
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bridge/Twig/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Expand Up @@ -40,7 +40,7 @@
"symfony/dom-crawler": "^2.0.5",
"symfony/intl": "~2.3",
"symfony/security": "~2.6",
"symfony/form": "~2.7.25|^2.8.18",
"symfony/form": "~2.7.26|^2.8.19",
"symfony/class-loader": "~2.1",
"symfony/expression-language": "~2.6",
"symfony/process": "^2.0.5",
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/SecurityBundle/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/TwigBundle/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/WebProfilerBundle/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Asset/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/BrowserKit/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/ClassLoader/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Config/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
Expand Up @@ -34,7 +34,7 @@ protected function tearDown()
}

/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRender($headers, $rows, $layout, $expected)
{
Expand All @@ -50,7 +50,7 @@ public function testRender($headers, $rows, $layout, $expected)
}

/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRenderAddRows($headers, $rows, $layout, $expected)
{
Expand All @@ -66,7 +66,7 @@ public function testRenderAddRows($headers, $rows, $layout, $expected)
}

/**
* @dataProvider testRenderProvider
* @dataProvider renderProvider
*/
public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected)
{
Expand All @@ -83,7 +83,7 @@ public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected)
$this->assertEquals($expected, $this->getOutputContent($output));
}

public function testRenderProvider()
public function renderProvider()
{
$books = array(
array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'),
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Console/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/CssSelector/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Debug/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/DependencyInjection/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/DomCrawler/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/EventDispatcher/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/ExpressionLanguage/phpunit.xml.dist
Expand Up @@ -10,6 +10,8 @@
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Filesystem/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Finder/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Form/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpFoundation/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpKernel/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Intl/Tests/Locale/LocaleTest.php
Expand Up @@ -153,6 +153,8 @@ public function testSetDefault()
public function testSetDefaultAcceptsEn()
{
$this->call('setDefault', 'en');

$this->assertSame('en', $this->call('getDefault'));
}

protected function call($methodName)
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Intl/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Locale/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/OptionsResolver/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Process/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/PropertyAccess/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Routing/phpunit.xml.dist
Expand Up @@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Security/Acl/phpunit.xml.dist
Expand Up @@ -10,6 +10,8 @@
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Security/Core/phpunit.xml.dist
Expand Up @@ -10,6 +10,8 @@
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Security/Csrf/phpunit.xml.dist
Expand Up @@ -10,6 +10,8 @@
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Security/Http/phpunit.xml.dist
Expand Up @@ -10,6 +10,8 @@
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down

0 comments on commit cff1842

Please sign in to comment.