Skip to content

Commit 390791a

Browse files
committed
Migrate to phpunit 6
1 parent f7b56e9 commit 390791a

File tree

20 files changed

+58
-74
lines changed

20 files changed

+58
-74
lines changed

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
"require": {
2424
"php": "^7.0",
2525
"friendsofphp/php-cs-fixer": "^2.1",
26-
"phpunit/phpunit-mock-objects": "~4.0",
2726
"phpunit/phpunit": "~6.0",
28-
"mybuilder/phpunit-accelerator": "^1.1",
2927
"squizlabs/php_codesniffer": "~2.8",
3028
"phpmd/phpmd": "~2.6",
3129
"symfony/dependency-injection": "~2.7|~3.0",

composer.lock

Lines changed: 3 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
</testsuite>
1818
</testsuites>
1919

20-
<listeners>
21-
<listener class="\Mockery\Adapter\Phpunit\TestListener"/>
22-
<listener class="\MyBuilder\PhpunitAccelerator\TestListener"/>
23-
</listeners>
24-
2520
<filter>
2621
<whitelist>
2722
<directory>./src/PhpGitHooks/Module/*/</directory>

src/PhpGitHooks/Module/Composer/Tests/Infrastructure/ComposerUnitTestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
namespace PhpGitHooks\Module\Composer\Tests\Infrastructure;
44

5+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
56
use PhpGitHooks\Module\Git\Tests\Infrastructure\OutputInterfaceTrait;
67
use PhpGitHooks\Module\Shared\Tests\Infrastructure\QueryBusTrait;
8+
use PHPUnit\Framework\TestCase;
79

8-
abstract class ComposerUnitTestCase extends \PHPUnit_Framework_TestCase
10+
abstract class ComposerUnitTestCase extends TestCase
911
{
12+
use MockeryPHPUnitIntegration;
1013
use OutputInterfaceTrait;
1114
use QueryBusTrait;
1215
}

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/ConfigFactoryTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
use PhpGitHooks\Module\Configuration\Service\ConfigFactory;
66
use PhpGitHooks\Module\Configuration\Tests\Stub\ConfigArrayDataStub;
7+
use PHPUnit\Framework\TestCase;
78

8-
class ConfigFactoryTest extends \PHPUnit_Framework_TestCase
9+
class ConfigFactoryTest extends TestCase
910
{
11+
1012
/**
1113
* @test
1214
*/

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/InvalidToolInterfaceExceptionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace PhpGitHooks\Module\Configuration\Tests\Behaviour;
44

55
use PhpGitHooks\Module\Configuration\Contract\Exception\InvalidToolInterfaceException;
6+
use PHPUnit\Framework\TestCase;
67

7-
class InvalidToolInterfaceExceptionTest extends \PHPUnit_Framework_TestCase
8+
class InvalidToolInterfaceExceptionTest extends TestCase
89
{
910
/**
1011
* @test

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/LevelTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
namespace PhpGitHooks\Module\Configuration\Tests\Behaviour;
44

55
use PhpGitHooks\Module\Configuration\Domain\Level;
6-
use PhpGitHooks\Module\Shared\Contract\Exception\InvalidBooleanException;
6+
use PHPUnit\Framework\TestCase;
7+
use PhpValueObjects\Scalar\Exception\InvalidBooleanException;
78

8-
class LevelTest extends \PHPUnit_Framework_TestCase
9+
class LevelTest extends TestCase
910
{
1011
/**
1112
* @test
1213
*/
1314
public function itShouldThrowsException()
1415
{
15-
$this->expectException(\PhpValueObjects\Scalar\Exception\InvalidBooleanException::class);
16+
$this->expectException(InvalidBooleanException::class);
1617

1718
new Level('string');
1819
}

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/MessageTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace PhpGitHooks\Module\Configuration\Tests\Behaviour;
44

55
use PhpGitHooks\Module\Configuration\Domain\Message;
6+
use PHPUnit\Framework\TestCase;
67
use PhpValueObjects\Scalar\Exception\InvalidStringException;
78

8-
class MessageTest extends \PHPUnit_Framework_TestCase
9+
class MessageTest extends TestCase
910
{
1011
/**
1112
* @test

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/MinimumStrictCoverageTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
namespace PhpGitHooks\Module\Configuration\Tests\Behaviour;
44

55
use PhpGitHooks\Module\Configuration\Domain\MinimumStrictCoverage;
6+
use PHPUnit\Framework\TestCase;
67
use PhpValueObjects\Scalar\Exception\InvalidFloatException;
78

8-
class MinimumStrictCoverageTest extends \PHPUnit_Framework_TestCase
9+
class MinimumStrictCoverageTest extends TestCase
910
{
1011
/**
1112
* @test

src/PhpGitHooks/Module/Configuration/Tests/Behaviour/PhpCsStandardTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
use PhpGitHooks\Module\Configuration\Contract\Exception\InvalidPhpCsStandardException;
66
use PhpGitHooks\Module\Configuration\Domain\PhpCsStandard;
7+
use PHPUnit\Framework\TestCase;
78

8-
class PhpCsStandardTest extends \PHPUnit_Framework_TestCase
9+
class PhpCsStandardTest extends TestCase
910
{
1011
/**
1112
* @test

0 commit comments

Comments
 (0)