4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- namespace Magento \Framework \View \Layout \ Reader ;
7
+ namespace Magento \Framework \View \Layout ;
8
8
9
9
use Magento \TestFramework \Helper \ObjectManager as ObjectManagerHelper ;
10
10
11
- class PoolTest extends \PHPUnit_Framework_TestCase
11
+ class ReaderPoolTest extends \PHPUnit_Framework_TestCase
12
12
{
13
13
/** @var ObjectManagerHelper */
14
14
protected $ objectManagerHelper ;
@@ -39,7 +39,7 @@ protected function setUp()
39
39
40
40
public function testInterpret ()
41
41
{
42
- /** @var Context $contextMock */
42
+ /** @var Reader\ Context $contextMock */
43
43
$ contextMock = $ this ->getMockBuilder ('Magento\Framework\View\Layout\Reader\Context ' )
44
44
->disableOriginalConstructor ()->getMock ();
45
45
@@ -52,7 +52,7 @@ public function testInterpret()
52
52
*/
53
53
$ moveReaderMock = $ this ->getMockBuilder ('Magento\Framework\View\Layout\Reader\Move ' )
54
54
->disableOriginalConstructor ()->getMock ();
55
- $ moveReaderMock ->expects ($ this ->once ( ))->method ('interpret ' )
55
+ $ moveReaderMock ->expects ($ this ->exactly ( 2 ))->method ('interpret ' )
56
56
->willReturn ($ this ->returnSelf ());
57
57
$ moveReaderMock ->method ('getSupportedNodes ' )
58
58
->willReturn (['move ' ]);
@@ -62,13 +62,13 @@ public function testInterpret()
62
62
*/
63
63
$ removeReaderMock = $ this ->getMockBuilder ('Magento\Framework\View\Layout\Reader\Remove ' )
64
64
->disableOriginalConstructor ()->getMock ();
65
- $ removeReaderMock ->expects ($ this ->once ( ))->method ('interpret ' )
65
+ $ removeReaderMock ->expects ($ this ->exactly ( 2 ))->method ('interpret ' )
66
66
->with ()
67
67
->willReturn ($ this ->returnSelf ());
68
68
$ removeReaderMock ->method ('getSupportedNodes ' )
69
69
->willReturn (['remove ' ]);
70
70
71
- $ this ->readerFactoryMock ->expects ($ this ->any ( ))
71
+ $ this ->readerFactoryMock ->expects ($ this ->exactly ( 2 ))
72
72
->method ('create ' )
73
73
->will ($ this ->returnValueMap (
74
74
[
@@ -78,5 +78,6 @@ public function testInterpret()
78
78
));
79
79
80
80
$ this ->pool ->interpret ($ contextMock , $ currentElement );
81
+ $ this ->pool ->interpret ($ contextMock , $ currentElement );
81
82
}
82
83
}
0 commit comments