Skip to content

Commit f6536a9

Browse files
committed
Fix prophet.
1 parent 7d18b36 commit f6536a9

File tree

4 files changed

+22
-27
lines changed

4 files changed

+22
-27
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"require-dev": {
4141
"phpstan/phpstan": "^1.4",
4242
"phpunit/phpunit": "^9.5",
43+
"phpspec/prophecy-phpunit": "^2.0",
4344
"squizlabs/php_codesniffer": "^3.6"
4445
},
4546
"scripts": {

phpunit.xml.dist

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
4-
backupGlobals="true"
5-
beStrictAboutOutputDuringTests="true"
6-
colors="true"
7-
bootstrap="tests/bootstrap.php">
8-
9-
<testsuites>
10-
<testsuite name="PHP Autoload Override Test Suite">
11-
<directory>./tests/</directory>
12-
</testsuite>
13-
</testsuites>
14-
15-
<filter>
16-
<whitelist processUncoveredFilesFromWhitelist="true">
17-
<directory suffix=".php">src/</directory>
18-
</whitelist>
19-
</filter>
20-
21-
<logging>
22-
<log
23-
type="coverage-html"
24-
target="./coverage"
25-
lowUpperBound="20"
26-
highLowerBound="50"/>
27-
</logging>
28-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="true" beStrictAboutOutputDuringTests="true" colors="true" bootstrap="tests/bootstrap.php">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
<report>
8+
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
9+
</report>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="PHP Autoload Override Test Suite">
13+
<directory>./tests/</directory>
14+
</testsuite>
15+
</testsuites>
16+
<logging/>
2917
</phpunit>

tests/CodeConverterTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
use PhpParser\Parser;
1515
use PHPUnit\Framework\TestCase;
1616
use Prophecy\Argument;
17+
use Prophecy\PhpUnit\ProphecyTrait;
1718
use Prophecy\Prophecy\MethodProphecy;
1819
use RuntimeException;
1920

2021
class CodeConverterTest extends TestCase
2122
{
23+
use ProphecyTrait;
24+
2225
public function testConvert(): void
2326
{
2427
$converter = new CodeConverter();

tests/OverrideTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Composer\Autoload\ClassLoader;
1717
use PHPUnit\Framework\TestCase;
1818
use Prophecy\Argument;
19+
use Prophecy\PhpUnit\ProphecyTrait;
1920
use Prophecy\Prophecy\MethodProphecy;
2021
use ReflectionMethod;
2122
use ReflectionProperty;
@@ -26,6 +27,8 @@
2627
*/
2728
class OverrideTest extends TestCase
2829
{
30+
use ProphecyTrait;
31+
2932
public function testSetCodeConverter()
3033
{
3134
$converter = $this->createMock(CodeConverter::class);

0 commit comments

Comments
 (0)