Skip to content

Commit

Permalink
Fix prophet.
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuter committed Mar 2, 2022
1 parent 7d18b36 commit f6536a9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"require-dev": {
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "^3.6"
},
"scripts": {
Expand Down
42 changes: 15 additions & 27 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
backupGlobals="true"
beStrictAboutOutputDuringTests="true"
colors="true"
bootstrap="tests/bootstrap.php">

<testsuites>
<testsuite name="PHP Autoload Override Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

<logging>
<log
type="coverage-html"
target="./coverage"
lowUpperBound="20"
highLowerBound="50"/>
</logging>

<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">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<html outputDirectory="./coverage" lowUpperBound="20" highLowerBound="50"/>
</report>
</coverage>
<testsuites>
<testsuite name="PHP Autoload Override Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>
3 changes: 3 additions & 0 deletions tests/CodeConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
use PhpParser\Parser;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\MethodProphecy;
use RuntimeException;

class CodeConverterTest extends TestCase
{
use ProphecyTrait;

public function testConvert(): void
{
$converter = new CodeConverter();
Expand Down
3 changes: 3 additions & 0 deletions tests/OverrideTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Composer\Autoload\ClassLoader;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\MethodProphecy;
use ReflectionMethod;
use ReflectionProperty;
Expand All @@ -26,6 +27,8 @@
*/
class OverrideTest extends TestCase
{
use ProphecyTrait;

public function testSetCodeConverter()
{
$converter = $this->createMock(CodeConverter::class);
Expand Down

0 comments on commit f6536a9

Please sign in to comment.