Skip to content

Commit

Permalink
Reproduce the #915 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Dec 10, 2024
1 parent 1ad660c commit a5357ea
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/Unit/WrapperRunner/WrapperRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,28 @@ public function testBaselineIsRespected(): void
Time: %s, Memory: %s MB
OK%a
EOF;
self::assertStringMatchesFormat($expectedOutput, $runnerResult->output);
self::assertEquals(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode);
}

#[Group('github')]
public function testDeprecationsShouldNotRaiseException(): void
{
$this->bareOptions['--configuration'] = $this->fixture('github' . DIRECTORY_SEPARATOR . 'GH915' . DIRECTORY_SEPARATOR . 'phpunit.xml');

$runnerResult = $this->runRunner();

$expectedOutput = <<<'EOF'
Processes: %s
Runtime: PHP %s
Configuration: %s
. 1 / 1 (100%)
Time: %s, Memory: %s MB
OK%a
EOF;
self::assertStringMatchesFormat($expectedOutput, $runnerResult->output);
Expand Down
16 changes: 16 additions & 0 deletions test/fixtures/github/GH915/IssueTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace ParaTest\Tests\fixtures\github\GH915;

use PHPUnit\Framework\TestCase;

/** @internal */
final class IssueTest extends TestCase
{
public function testasd(): void
{
self::assertSame(1, 1);
}
}
12 changes: 12 additions & 0 deletions test/fixtures/github/GH915/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../vendor/phpunit/phpunit/phpunit.xsd"
stopOnDeprecation="true"
>
<testsuites>
<testsuite name="Github issue">
<file>IssueTest.php</file>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit a5357ea

Please sign in to comment.