Skip to content

Commit 8c7e59b

Browse files
Improve TestDox output
1 parent 11e6f46 commit 8c7e59b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unit/Framework/MockObject/Creation/MockBuilderTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\Attributes\CoversClass;
1515
use PHPUnit\Framework\Attributes\Group;
1616
use PHPUnit\Framework\Attributes\Medium;
17+
use PHPUnit\Framework\Attributes\TestDox;
1718
use PHPUnit\Framework\TestCase;
1819
use PHPUnit\TestFixture\MockObject\ExtendableClass;
1920
use PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration;
@@ -26,6 +27,7 @@
2627
#[Medium]
2728
final class MockBuilderTest extends TestCase
2829
{
30+
#[TestDox('setMockClassName() can be used to configure the name of the mock object class')]
2931
public function testCanCreateMockObjectWithSpecifiedClassName(): void
3032
{
3133
$className = 'random_' . md5((string) mt_rand());
@@ -37,6 +39,7 @@ public function testCanCreateMockObjectWithSpecifiedClassName(): void
3739
$this->assertSame($className, $double::class);
3840
}
3941

42+
#[TestDox('addMethods() can be used to configure an additional method for the mock object class when the original class does not have a method of the same name')]
4043
public function testCanCreateMockObjectForExtendableClassWhileAddingMethodsToIt(): void
4144
{
4245
$double = $this->getMockBuilder(ExtendableClass::class)
@@ -50,6 +53,7 @@ public function testCanCreateMockObjectForExtendableClassWhileAddingMethodsToIt(
5053
$this->assertSame($value, $double->additionalMethod());
5154
}
5255

56+
#[TestDox('addMethods() cannot be used to configure an additional method for the mock object class when the original class has a method of the same name')]
5357
public function testCannotCreateMockObjectForExtendableClassAddingMethodsToItThatItAlreadyHas(): void
5458
{
5559
$this->expectException(CannotUseAddMethodsException::class);

0 commit comments

Comments
 (0)