Skip to content

Commit

Permalink
Add (failing) test for #3607
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Apr 19, 2019
1 parent 898243a commit 2e71a95
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/Framework/MockObject/ProxyObjectTest.php
Expand Up @@ -77,4 +77,17 @@ public function testProxyingWorksForMethodThatReturnsUndeclaredObjectOfFinalClas

$this->assertSame('value', $proxy->returnObjectOfFinalClass()->value());
}

public function testProxyingWorksForMethodThatReturnsDeclaredObjectOfFinalClass(): void
{
$proxy = $this->createTestProxy(TestProxyFixture::class);

$proxy->expects($this->once())
->method('returnTypedObjectOfFinalClass');

\assert($proxy instanceof MockObject);
\assert($proxy instanceof TestProxyFixture);

$this->assertSame('value', $proxy->returnTypedObjectOfFinalClass()->value());
}
}

0 comments on commit 2e71a95

Please sign in to comment.