Skip to content

Commit

Permalink
Travic CI Test case errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sashas777 committed May 11, 2018
1 parent 49a099f commit 6ec1b97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/View/Asset/Merged.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Merged implements \Iterator
protected $contentType;

/**
* @var StorageInterface
* @var \Magento\Framework\App\View\Deployment\Version\StorageInterface
*/
private $versionStorage;

Expand Down
13 changes: 12 additions & 1 deletion lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Magento\Framework\View\Asset\Repository as AssetRepository;
use Magento\Framework\View\Asset\MergeableInterface;
use Magento\Framework\View\Asset\MergeStrategyInterface;
use Magento\Framework\App\View\Deployment\Version\StorageInterface;

/**
* Class MergedTest
Expand Down Expand Up @@ -43,6 +44,11 @@ class MergedTest extends \PHPUnit\Framework\TestCase
*/
private $assetRepo;

/**
* @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject
*/
private $versionStorage;

protected function setUp()
{
$this->assetJsOne = $this->getMockForAbstractClass(MergeableInterface::class);
Expand All @@ -66,6 +72,7 @@ protected function setUp()
$this->assetRepo = $this->getMockBuilder(AssetRepository::class)
->disableOriginalConstructor()
->getMock();
$this->versionStorage = $this->createMock(StorageInterface::class);
}

/**
Expand All @@ -74,7 +81,7 @@ protected function setUp()
*/
public function testConstructorNothingToMerge()
{
new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, []);
new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, $this->versionStorage, []);
}

/**
Expand All @@ -89,6 +96,7 @@ public function testConstructorRequireMergeInterface()
'logger' => $this->logger,
'mergeStrategy' => $this->mergeStrategy,
'assetRepo' => $this->assetRepo,
'versionStorage' => $this->versionStorage,
'assets' => [$this->assetJsOne, $assetUrl],
]);
}
Expand All @@ -108,6 +116,7 @@ public function testConstructorIncompatibleContentTypes()
'logger' => $this->logger,
'mergeStrategy' => $this->mergeStrategy,
'assetRepo' => $this->assetRepo,
'versionStorage' => $this->versionStorage,
'assets' => [$this->assetJsOne, $assetCss],
]);
}
Expand All @@ -123,6 +132,7 @@ public function testIteratorInterfaceMerge()
'logger' => $this->logger,
'mergeStrategy' => $this->mergeStrategy,
'assetRepo' => $this->assetRepo,
'versionStorage' => $this->versionStorage,
'assets' => $assets,
]);

Expand Down Expand Up @@ -157,6 +167,7 @@ public function testIteratorInterfaceMergeFailure()
'logger' => $this->logger,
'mergeStrategy' => $this->mergeStrategy,
'assetRepo' => $this->assetRepo,
'versionStorage' => $this->versionStorage,
'assets' => [$this->assetJsOne, $this->assetJsTwo, $assetBroken],
]);

Expand Down

0 comments on commit 6ec1b97

Please sign in to comment.