Skip to content

Commit

Permalink
Use PHPUnit bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
villfa committed Oct 29, 2020
1 parent b841796 commit 266cfe0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: "composer install --no-interaction --no-progress --prefer-dist"

- name: "Run tests"
run: "vendor/bin/phpunit --colors=always --testdox"
run: "vendor/bin/simple-phpunit --colors=always --testdox"

- name: "Run Churn"
run: "php bin/churn run src -p -vvv"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ docs
vendor
coverage.xml
*.phar
.phpunit.result.cache
.idea
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"php-parallel-lint/php-parallel-lint": "^1.2",
"phploc/phploc": ">=4.0",
"phpmd/phpmd": "^2.5",
"phpunit/phpunit": "^7.5.20",
"sebastian/phpcpd": "^4.0",
"slevomat/coding-standard": "^3.0"
"slevomat/coding-standard": "^3.0",
"symfony/phpunit-bridge": "^5.1"
},
"config": {
"sort-packages": true
Expand Down Expand Up @@ -70,7 +70,7 @@
"phpmd src text phpmd.xml",
"phploc src",
"phpcpd src",
"phpunit --colors=always --testdox --coverage-clover=coverage.xml",
"simple-phpunit --colors=always --testdox --coverage-clover=coverage.xml",
"@php bin/churn run src -p -vvv"
]
}
Expand Down
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
>
<testsuites>
<testsuite name="churn-tests">
Expand All @@ -15,4 +16,7 @@
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<php>
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1" />
</php>
</phpunit>
7 changes: 3 additions & 4 deletions tests/Unit/Configuration/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

use Churn\Configuration\Config;
use Churn\Tests\BaseTestCase;
use InvalidArgumentException;

class ConfigTest extends BaseTestCase
{
/**
* @test
* @expectedException \InvalidArgumentException
**/
/** @test */
public function it_throws_exception_if_badly_instantiated()
{
$this->expectException(InvalidArgumentException::class);
$this->assertInstanceOf(
Config::class,
Config::create(['fileExtensions' => 5])
Expand Down

0 comments on commit 266cfe0

Please sign in to comment.