Skip to content

Commit 011d877

Browse files
authored
Merge pull request #8 from irishdistillers/public-getprophet
make TestContainer::getProphet() public
2 parents 5694def + 05f1284 commit 011d877

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/DependencyInjection/TestContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function getMockedServices()
125125
/**
126126
* @return Prophet
127127
*/
128-
protected function getProphet()
128+
public function getProphet()
129129
{
130130
if (!$this->prophet) {
131131
$this->prophet = new Prophet();

tests/DependencyInjection/TestContainerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,11 @@ public function testMockedServiceMustBeInitialized()
139139
$this->container->prophesize($id, 'stdClass');
140140
$this->assertTrue($this->container->initialized($id));
141141
}
142+
143+
public function testGetProphecyReturnsSameObjectTwice()
144+
{
145+
$prophet = $this->container->getProphet();
146+
$this->assertSame($prophet, $this->container->getProphet());
147+
}
142148
}
143149

0 commit comments

Comments
 (0)