-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'main/develop' into MAGETWO-32996
- Loading branch information
Showing
7 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
setup/src/Magento/Setup/Test/Unit/Model/SampleDataTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Setup\Test\Unit\Model; | ||
|
||
use Magento\Setup\Model\SampleData; | ||
|
||
/** | ||
* Test Magento\Setup\Model\SampleData | ||
*/ | ||
class SampleDataTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \Magento\Setup\Model\SampleData | ||
*/ | ||
protected $sampleDataInstall; | ||
|
||
/** | ||
* @var \Magento\Framework\Setup\LoggerInterface | ||
*/ | ||
protected $loggerInterface; | ||
|
||
/** | ||
* @var \Magento\Framework\App\Filesystem\DirectoryList | ||
*/ | ||
protected $directoryList; | ||
|
||
protected function setUp() | ||
{ | ||
$this->loggerInterface = $this->getMock('Magento\Framework\Setup\LoggerInterface'); | ||
$this->directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false); | ||
$this->sampleDataInstall = new SampleData($this->directoryList); | ||
} | ||
|
||
public function testIsDeployed() | ||
{ | ||
$this->directoryList->expects($this->once())->method('getPath')->with('code'); | ||
$this->sampleDataInstall->isDeployed(); | ||
} | ||
|
||
/** | ||
* Test SampleData installation check method. | ||
* Can be tested only negative case because file_exists method used in the tested class | ||
*/ | ||
public function testIsInstalledSuccessfully() | ||
{ | ||
$this->assertFalse($this->sampleDataInstall->isInstalledSuccessfully()); | ||
} | ||
} |