Skip to content

Commit 73798a8

Browse files
Rename test
1 parent 42e0c55 commit 73798a8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/unit/Framework/MockObject/TestDoubleTestCase.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ final public function testMethodCanBeConfiguredToThrowAnException(): void
204204
$this->fail();
205205
}
206206

207+
public function testMethodWithNeverReturnTypeDeclarationThrowsException(): void
208+
{
209+
$double = $this->createTestDouble(InterfaceWithNeverReturningMethod::class);
210+
211+
$this->expectException(NeverReturningMethodException::class);
212+
$this->expectExceptionMessage('Method PHPUnit\TestFixture\MockObject\InterfaceWithNeverReturningMethod::m() is declared to never return');
213+
214+
$double->m();
215+
}
216+
207217
#[TestDox('Original __clone() method is not called by default when test double object is cloned')]
208218
public function testOriginalCloneMethodIsNotCalledByDefaultWhenTestDoubleObjectIsCloned(): void
209219
{
@@ -223,16 +233,6 @@ public function testOriginalCloneMethodCanOptionallyBeCalledWhenTestDoubleObject
223233
clone $double;
224234
}
225235

226-
public function testThrowsExceptionWhenMethodWithNeverReturnTypeDeclarationIsCalled(): void
227-
{
228-
$double = $this->createTestDouble(InterfaceWithNeverReturningMethod::class);
229-
230-
$this->expectException(NeverReturningMethodException::class);
231-
$this->expectExceptionMessage('Method PHPUnit\TestFixture\MockObject\InterfaceWithNeverReturningMethod::m() is declared to never return');
232-
233-
$double->m();
234-
}
235-
236236
/**
237237
* @psalm-template RealInstanceType of object
238238
*

0 commit comments

Comments
 (0)