File tree Expand file tree Collapse file tree 5 files changed +11
-4
lines changed
app/code/Magento/Theme/Test/Unit/Model Expand file tree Collapse file tree 5 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Theme \Test \Unit \Model \Theme ;
7
7
8
+ use Magento \Framework \View \Design \Theme \Customization \FileServiceFactory ;
8
9
use Magento \Framework \View \DesignInterface ;
9
10
use Magento \Theme \Model \Theme \File ;
10
11
@@ -26,7 +27,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
26
27
protected $ themeFactory ;
27
28
28
29
/**
29
- * @var \Magento\Framework\View\Design\Theme\Customization\ FileServiceFactory|\PHPUnit_Framework_MockObject_MockObject
30
+ * @var FileServiceFactory|\PHPUnit_Framework_MockObject_MockObject
30
31
*/
31
32
protected $ fileServiceFactory ;
32
33
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ public function setUp()
50
50
);
51
51
}
52
52
53
+ /**
54
+ * @test
55
+ * @return void
56
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
57
+ */
53
58
public function testRegister ()
54
59
{
55
60
$ image = 'preview.jpg ' ;
Original file line number Diff line number Diff line change @@ -62,8 +62,10 @@ public function testGetThemeCustomizations()
62
62
{
63
63
$ collectionFactory = $ this ->getMockBuilder ('Magento\Theme\Model\Resource\Theme\CollectionFactory ' )
64
64
->setMethods (['create ' ])
65
+ ->disableOriginalConstructor ()
65
66
->getMock ();
66
67
$ themeFactory = $ this ->getMockBuilder ('Magento\Theme\Model\ThemeFactory ' )
68
+ ->disableOriginalConstructor ()
67
69
->setMethods (['create ' ])
68
70
->getMock ();
69
71
$ collection = $ this ->getMockBuilder ('Magento\Theme\Model\Resource\Theme\Collection ' )
Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ public function testAfterDelete()
299
299
$ this ->resourceCollection ->expects ($ this ->at (0 ))
300
300
->method ('addFieldToFilter ' )
301
301
->with ('parent_id ' , 1 )
302
- ->willReturnSelf ();;
302
+ ->willReturnSelf ();
303
303
$ this ->resourceCollection ->expects ($ this ->at (1 ))
304
304
->method ('addFieldToFilter ' )
305
305
->with ('type ' , Theme::TYPE_STAGING )
@@ -331,7 +331,7 @@ public function testGetStagingVersion()
331
331
$ this ->resourceCollection ->expects ($ this ->at (0 ))
332
332
->method ('addFieldToFilter ' )
333
333
->with ('parent_id ' , 1 )
334
- ->willReturnSelf ();;
334
+ ->willReturnSelf ();
335
335
$ this ->resourceCollection ->expects ($ this ->at (1 ))
336
336
->method ('addFieldToFilter ' )
337
337
->with ('type ' , Theme::TYPE_STAGING )
Original file line number Diff line number Diff line change @@ -466,7 +466,6 @@ public function testDeleteFile()
466
466
{
467
467
$ image = 'image.jpg ' ;
468
468
$ storagePath = $ this ->_storageRoot ;
469
- $ imagePath = $ storagePath . '/ ' . $ image ;
470
469
471
470
$ this ->_helperStorage ->expects ($ this ->once ())
472
471
->method ('getCurrentPath ' )
You can’t perform that action at this time.
0 commit comments