Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Update service name when mocking
Browse files Browse the repository at this point in the history
- s/translator/MvcTranslator/
  • Loading branch information
weierophinney committed May 3, 2013
1 parent b0a6080 commit 8d01a0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ValidatorPluginManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public function testAllowsInjectingTranslator()
{
$translator = $this->getMock('ZendTest\Validator\TestAsset\Translator');

$slContents = array(array('translator', $translator));
$slContents = array(array('MvcTranslator', $translator));
$serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface');
$serviceLocator->expects($this->once())
->method('get')
->will($this->returnValueMap($slContents));
$serviceLocator->expects($this->once())
->method('has')
->with($this->equalTo('translator'))
->with($this->equalTo('MvcTranslator'))
->will($this->returnValue(true));

$this->validators->setServiceLocator($serviceLocator);
Expand All @@ -51,7 +51,7 @@ public function testNoTranslatorInjectedWhenTranslatorIsNotPresent()
$serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface');
$serviceLocator->expects($this->once())
->method('has')
->with($this->equalTo('translator'))
->with($this->equalTo('MvcTranslator'))
->will($this->returnValue(false));

$this->validators->setServiceLocator($serviceLocator);
Expand Down

0 comments on commit 8d01a0e

Please sign in to comment.