|
11 | 11 |
|
12 | 12 | use PHPUnit\Framework\TestCase; |
13 | 13 | use stdClass; |
| 14 | +use Zend\Escaper\Escaper; |
14 | 15 | use Zend\View\Helper\EscapeHtmlAttr as EscapeHelper; |
15 | 16 |
|
16 | 17 | class EscapeHtmlAttrTest extends TestCase |
@@ -51,22 +52,22 @@ public function testGetEscaperCreatesDefaultInstanceWithCorrectEncoding() |
51 | 52 | { |
52 | 53 | $this->helper->setEncoding('BIG5-HKSCS'); |
53 | 54 | $escaper = $this->helper->getEscaper(); |
54 | | - $this->assertInstanceOf('Zend\Escaper\Escaper', $escaper); |
| 55 | + $this->assertInstanceOf(Escaper::class, $escaper); |
55 | 56 | $this->assertEquals('big5-hkscs', $escaper->getEncoding()); |
56 | 57 | } |
57 | 58 |
|
58 | 59 | public function testSettingEscaperObjectAlsoSetsEncoding() |
59 | 60 | { |
60 | | - $escaper = new \Zend\Escaper\Escaper('big5-hkscs'); |
| 61 | + $escaper = new Escaper('big5-hkscs'); |
61 | 62 | $this->helper->setEscaper($escaper); |
62 | 63 | $escaper = $this->helper->getEscaper(); |
63 | | - $this->assertInstanceOf('Zend\Escaper\Escaper', $escaper); |
| 64 | + $this->assertInstanceOf(Escaper::class, $escaper); |
64 | 65 | $this->assertEquals('big5-hkscs', $escaper->getEncoding()); |
65 | 66 | } |
66 | 67 |
|
67 | 68 | public function testEscapehtmlCalledOnEscaperObject() |
68 | 69 | { |
69 | | - $escaper = $this->getMockBuilder('\\Zend\\Escaper\\Escaper')->getMock(); |
| 70 | + $escaper = $this->getMockBuilder(Escaper::class)->getMock(); |
70 | 71 | $escaper->expects($this->any())->method('escapeHtmlAttr'); |
71 | 72 | $this->helper->setEscaper($escaper); |
72 | 73 | $this->helper->__invoke('foo'); |
|
0 commit comments