Skip to content

Commit 9b4ada6

Browse files
committed
fixed obsolete getMock() usage
1 parent efb26fa commit 9b4ada6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/TranslatorCacheTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testCatalogueIsReloadedWhenResourcesAreNoLongerFresh()
9595
$catalogue->addResource(new StaleResource()); // better use a helper class than a mock, because it gets serialized in the cache and re-loaded
9696

9797
/** @var LoaderInterface|\PHPUnit_Framework_MockObject_MockObject $loader */
98-
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
98+
$loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock();
9999
$loader
100100
->expects($this->exactly(2))
101101
->method('load')
@@ -228,8 +228,8 @@ public function testPrimaryAndFallbackCataloguesContainTheSameMessagesRegardless
228228

229229
public function testRefreshCacheWhenResourcesAreNoLongerFresh()
230230
{
231-
$resource = $this->getMock('Symfony\Component\Config\Resource\SelfCheckingResourceInterface');
232-
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
231+
$resource = $this->getMockBuilder('Symfony\Component\Config\Resource\SelfCheckingResourceInterface')->getMock();
232+
$loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock();
233233
$resource->method('isFresh')->will($this->returnValue(false));
234234
$loader
235235
->expects($this->exactly(2))
@@ -272,7 +272,7 @@ public function runForDebugAndProduction()
272272
*/
273273
private function createFailingLoader()
274274
{
275-
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
275+
$loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock();
276276
$loader
277277
->expects($this->never())
278278
->method('load');

0 commit comments

Comments
 (0)