Skip to content

Commit

Permalink
Merge 68394e8 into 1f41daa
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansuter committed Mar 2, 2022
2 parents 1f41daa + 68394e8 commit 5fd121f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Expand Up @@ -10,10 +10,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ 7.2, 7.3, 7.4, 8.0 ]
php: [ 7.3, 7.4, 8.0, 8.1 ]
experimental: [ false ]
include:
- php: 8.0
- php: 8.1
analysis: true

steps:
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -34,13 +34,14 @@
]
},
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.3 || ^8.0",
"nikic/php-parser": "^4.4"
},
"require-dev": {
"phpstan/phpstan": "^0.12 || ^1.0",
"phpunit/phpunit": "^8.5 || ^9.3",
"squizlabs/php_codesniffer": "^3.5"
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "^3.6"
},
"scripts": {
"test": [
Expand Down
42 changes: 15 additions & 27 deletions phpunit.xml.dist
@@ -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
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
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 5fd121f

Please sign in to comment.