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

Commit 8e309f9

Browse files
committed
Incorporated feedback
- Imported `TranslatorInterface` from zend-i18n - Used `::class` notation for new mock instances Did not assert the entierty of the markup, as we're literally only interested in whether or not the translation string and surrounding markup are present for purposes of this test.
1 parent afb7a73 commit 8e309f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/View/Helper/FormRowTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace ZendTest\Form\View\Helper;
1111

1212
use PHPUnit_Framework_TestCase as TestCase;
13+
use Zend\I18n\Translator\TranslatorInterface;
1314
use Zend\Form\Element;
1415
use Zend\Form\Element\Captcha;
1516
use Zend\Form\View\HelperConfig;
@@ -253,7 +254,7 @@ public function testLabelWillBeTranslatedOnceWithoutId()
253254
$element = new Element('foo');
254255
$element->setLabel('The value for foo:');
255256

256-
$mockTranslator = $this->getMock('Zend\I18n\Translator\Translator');
257+
$mockTranslator = $this->getMock(TranslatorInterface::class);
257258
$mockTranslator->expects($this->exactly(1))
258259
->method('translate')
259260
->will($this->returnValue('translated content'));
@@ -273,7 +274,7 @@ public function testLabelWillBeTranslatedOnceWithId()
273274
$element->setLabel('The value for foo:');
274275
$element->setAttribute('id', 'foo');
275276

276-
$mockTranslator = $this->getMock('Zend\I18n\Translator\Translator');
277+
$mockTranslator = $this->getMock(TranslatorInterface::class);
277278
$mockTranslator->expects($this->exactly(1))
278279
->method('translate')
279280
->will($this->returnValue('translated content'));

0 commit comments

Comments
 (0)