Skip to content

Commit 7449efe

Browse files
committed
Merge branch 'hotfix/1.1.10'
2 parents f7c4898 + b753e3a commit 7449efe

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sempro/phpunit-pretty-print",
3-
"version": "1.1.9",
3+
"version": "1.1.10",
44
"description": "Prettify PHPUnit output",
55
"type": "library",
66
"license": "MIT",

src/PrettyPrinter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function endTest(Test $test, float $time): void
3131

3232
$testMethodName = \PHPUnit\Util\Test::describe($test);
3333

34+
// Convert non-breaking method name to camelCase
35+
$testMethodName[1] = str_replace(' ', '', ucwords($testMethodName[1], ' '));
36+
3437
// Convert snakeCase method name to camelCase
3538
$testMethodName[1] = str_replace('_', '', ucwords($testMethodName[1], '_'));
3639

tests/Output.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,9 @@ public function test_should_convert_snake_case_to_lowercased_words()
4040
{
4141
$this->assertTrue(true);
4242
}
43+
44+
public function test should convert non breaking spaces to lowercased words()
45+
{
46+
$this->assertTrue(true);
47+
}
4348
}

tests/PrinterTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public function testTestNameCanBeSnakeCased()
5353
$this->assertStringContainsString('✓ should convert snake case to lowercased words', $lines[10]);
5454
}
5555

56+
public function testTestNameCanBeNonBreakingSpaced()
57+
{
58+
$lines = $this->getOutput();
59+
60+
$this->assertStringContainsString('✓ should convert non breaking spaces to lowercased words', $lines[11]);
61+
}
62+
5663
private function getOutput(): array
5764
{
5865
$command = [

0 commit comments

Comments
 (0)