@@ -130,6 +130,16 @@ class FormTest extends \PHPUnit_Framework_TestCase
130
130
*/
131
131
protected $ block ;
132
132
133
+ /**
134
+ * @var \Magento\Framework\View\Element\Template\File\Resolver|\PHPUnit_Framework_MockObject_MockObject
135
+ */
136
+ protected $ _resolver ;
137
+
138
+ /**
139
+ * @var \Magento\Framework\View\Element\Template\File\Validator|\PHPUnit_Framework_MockObject_MockObject
140
+ */
141
+ protected $ _validator ;
142
+
133
143
/**
134
144
* Sets up the fixture, for example, open a network connection.
135
145
* This method is called before a test is executed.
@@ -138,6 +148,22 @@ class FormTest extends \PHPUnit_Framework_TestCase
138
148
*/
139
149
public function setUp ()
140
150
{
151
+ $ this ->_resolver = $ this ->getMock (
152
+ 'Magento\Framework\View\Element\Template\File\Resolver ' ,
153
+ [],
154
+ [],
155
+ '' ,
156
+ false
157
+ );
158
+
159
+ $ this ->_validator = $ this ->getMock (
160
+ 'Magento\Framework\View\Element\Template\File\Validator ' ,
161
+ [],
162
+ [],
163
+ '' ,
164
+ false
165
+ );
166
+
141
167
$ this ->model = $ this ->getMock ('Magento\Cms\Model\Block ' , ['getBlockId ' , 'setStoreId ' ], [], '' , false );
142
168
143
169
$ this ->registry = $ this ->getMock ('Magento\Framework\Registry ' , [], [], '' , false );
@@ -193,10 +219,11 @@ public function setUp()
193
219
$ this ->context ->expects ($ this ->once ())->method ('getStoreManager ' )->willReturn ($ this ->storeManager );
194
220
$ this ->context ->expects ($ this ->once ())->method ('getUrlBuilder ' )->willReturn ($ this ->urlBuilder );
195
221
$ this ->context ->expects ($ this ->once ())->method ('getAppState ' )->willReturn ($ this ->appState );
196
- $ this ->context ->expects ($ this ->once ())->method ('getViewFileSystem ' )->willReturn ($ this ->viewFileSystem );
197
222
$ this ->context ->expects ($ this ->once ())->method ('getFilesystem ' )->willReturn ($ this ->fileSystem );
198
223
$ this ->context ->expects ($ this ->once ())->method ('getLogger ' )->willReturn ($ this ->logger );
199
224
$ this ->context ->expects ($ this ->once ())->method ('getLayout ' )->willReturn ($ this ->layout );
225
+ $ this ->context ->expects ($ this ->once ())->method ('getResolver ' )->willReturn ($ this ->_resolver );
226
+ $ this ->context ->expects ($ this ->once ())->method ('getValidator ' )->willReturn ($ this ->_validator );
200
227
201
228
/** @var \Magento\Cms\Block\Adminhtml\Block\Edit\Form $block */
202
229
$ this ->block = (new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this ))
0 commit comments