Skip to content

Commit 75951f1

Browse files
MAGETWO-36852: Code Coverage of South Modules
- increase code coverage for Magento_Theme module
1 parent f264789 commit 75951f1

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

app/code/Magento/Theme/Test/Unit/Model/Theme/FileTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Theme\Test\Unit\Model\Theme;
77

8+
use Magento\Framework\View\Design\Theme\Customization\FileServiceFactory;
89
use Magento\Framework\View\DesignInterface;
910
use Magento\Theme\Model\Theme\File;
1011

@@ -26,7 +27,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
2627
protected $themeFactory;
2728

2829
/**
29-
* @var \Magento\Framework\View\Design\Theme\Customization\FileServiceFactory|\PHPUnit_Framework_MockObject_MockObject
30+
* @var FileServiceFactory|\PHPUnit_Framework_MockObject_MockObject
3031
*/
3132
protected $fileServiceFactory;
3233

app/code/Magento/Theme/Test/Unit/Model/Theme/RegistrationTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public function setUp()
5050
);
5151
}
5252

53+
/**
54+
* @test
55+
* @return void
56+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
57+
*/
5358
public function testRegister()
5459
{
5560
$image = 'preview.jpg';

app/code/Magento/Theme/Test/Unit/Model/Theme/ThemeProviderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ public function testGetThemeCustomizations()
6262
{
6363
$collectionFactory = $this->getMockBuilder('Magento\Theme\Model\Resource\Theme\CollectionFactory')
6464
->setMethods(['create'])
65+
->disableOriginalConstructor()
6566
->getMock();
6667
$themeFactory = $this->getMockBuilder('Magento\Theme\Model\ThemeFactory')
68+
->disableOriginalConstructor()
6769
->setMethods(['create'])
6870
->getMock();
6971
$collection = $this->getMockBuilder('Magento\Theme\Model\Resource\Theme\Collection')

app/code/Magento/Theme/Test/Unit/Model/ThemeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public function testAfterDelete()
299299
$this->resourceCollection->expects($this->at(0))
300300
->method('addFieldToFilter')
301301
->with('parent_id', 1)
302-
->willReturnSelf();;
302+
->willReturnSelf();
303303
$this->resourceCollection->expects($this->at(1))
304304
->method('addFieldToFilter')
305305
->with('type', Theme::TYPE_STAGING)
@@ -331,7 +331,7 @@ public function testGetStagingVersion()
331331
$this->resourceCollection->expects($this->at(0))
332332
->method('addFieldToFilter')
333333
->with('parent_id', 1)
334-
->willReturnSelf();;
334+
->willReturnSelf();
335335
$this->resourceCollection->expects($this->at(1))
336336
->method('addFieldToFilter')
337337
->with('type', Theme::TYPE_STAGING)

app/code/Magento/Theme/Test/Unit/Model/Wysiwyg/StorageTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ public function testDeleteFile()
466466
{
467467
$image = 'image.jpg';
468468
$storagePath = $this->_storageRoot;
469-
$imagePath = $storagePath . '/' . $image;
470469

471470
$this->_helperStorage->expects($this->once())
472471
->method('getCurrentPath')

0 commit comments

Comments
 (0)