Skip to content

Commit 01edd70

Browse files
Add test
1 parent b7f5f53 commit 01edd70

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\TestDox;
11+
12+
use PHPUnit\Framework\Attributes\TestDox;
13+
use PHPUnit\Framework\TestCase;
14+
15+
#[TestDox('Custom Title')]
16+
final class TestDoxAttributeOnTestClassTest extends TestCase
17+
{
18+
}

tests/unit/Logging/TestDox/NamePrettifierTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPUnit\Framework\Attributes\Group;
1414
use PHPUnit\Framework\Attributes\Small;
1515
use PHPUnit\Framework\TestCase;
16+
use PHPUnit\TestFixture\TestDox\TestDoxAttributeOnTestClassTest;
1617

1718
#[CoversClass(NamePrettifier::class)]
1819
#[Group('testdox')]
@@ -30,6 +31,7 @@ public function testNameOfTestClassCanBePrettified(): void
3031
$this->assertSame('Unnamed Tests', (new NamePrettifier)->prettifyTestClassName('TestTest'));
3132
$this->assertSame('Système Testé', (new NamePrettifier)->prettifyTestClassName('SystèmeTestéTest'));
3233
$this->assertSame('Expression Évaluée', (new NamePrettifier)->prettifyTestClassName('ExpressionÉvaluéeTest'));
34+
$this->assertSame('Custom Title', (new NamePrettifier)->prettifyTestClassName(TestDoxAttributeOnTestClassTest::class));
3335
}
3436

3537
public function testNameOfTestMethodCanBePrettified(): void

0 commit comments

Comments
 (0)