Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: paratestphp/paratest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.4.2
Choose a base ref
...
head repository: paratestphp/paratest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.4.3
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Feb 20, 2024

  1. Copy the full SHA
    64fcfd0 View commit details
Showing with 55 additions and 0 deletions.
  1. +2 −0 src/WrapperRunner/SuiteLoader.php
  2. +22 −0 test/Unit/WrapperRunner/WrapperRunnerTest.php
  3. +31 −0 test/fixtures/same_beginning_of_name/SameBeginningOfNameTest.php
2 changes: 2 additions & 0 deletions src/WrapperRunner/SuiteLoader.php
Original file line number Diff line number Diff line change
@@ -95,6 +95,8 @@ public function __construct(
$name .= '@' . $dataName;
}
}
} else {
$name = sprintf('/%s$/', $name);
}

$tests[] = "$file\0$name";
22 changes: 22 additions & 0 deletions test/Unit/WrapperRunner/WrapperRunnerTest.php
Original file line number Diff line number Diff line change
@@ -642,6 +642,28 @@ public function testFunctionalParallelization(): void
Time: %s, Memory: %s MB
OK%a
EOF;
self::assertStringMatchesFormat($expectedOutput, $runnerResult->output);
self::assertSame(RunnerInterface::SUCCESS_EXIT, $runnerResult->exitCode);
}

#[RequiresPhp('8.2')]
public function testSameBeginningOfName(): void
{
$this->bareOptions['path'] = $this->fixture('same_beginning_of_name');
$this->bareOptions['--functional'] = true;

$runnerResult = $this->runRunner();

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

declare(strict_types=1);

namespace ParaTest\Tests\fixtures\same_beginning_of_name;

use PHPUnit\Framework\TestCase;

/** @internal */
final class SameBeginningOfNameTest extends TestCase
{
public function testSame(): void
{
self::assertTrue(true);
}

public function testSameBeginning(): void
{
self::assertTrue(true);
}

public function testSameBeginningOf(): void
{
self::assertTrue(true);
}

public function testSameBeginningOfName(): void
{
self::assertTrue(true);
}
}