-
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 pull request #454 from magento-falcons/MAGETWO-59114
[Falcons] Bug fixes for Import/Export, Travis
- Loading branch information
Showing
6 changed files
with
145 additions
and
8 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
50 changes: 50 additions & 0 deletions
50
dev/tests/integration/testsuite/Magento/Framework/Backup/FilesystemTest.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,50 @@ | ||
<?php | ||
/** | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Framework\Backup; | ||
|
||
use \Magento\TestFramework\Helper\Bootstrap; | ||
use \Magento\Framework\App\Filesystem\DirectoryList; | ||
|
||
class FilesystemTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \Magento\Framework\ObjectManagerInterface | ||
*/ | ||
private $objectManager; | ||
|
||
/** | ||
* @var \Magento\Framework\Backup\Filesystem | ||
*/ | ||
private $filesystem; | ||
|
||
protected function setUp() | ||
{ | ||
$this->objectManager = Bootstrap::getObjectManager(); | ||
$this->filesystem = $this->objectManager->create(\Magento\Framework\Backup\Filesystem::class); | ||
} | ||
|
||
/** | ||
* @magentoAppIsolation enabled | ||
*/ | ||
public function testRollback() | ||
{ | ||
$rootDir = Bootstrap::getInstance()->getAppTempDir() | ||
. '/rollback_test_' . time(); | ||
$backupsDir = __DIR__ . '/_files/var/backups'; | ||
$fileName = 'test.txt'; | ||
|
||
mkdir($rootDir); | ||
|
||
$this->filesystem->setRootDir($rootDir) | ||
->setBackupsDir($backupsDir) | ||
->setTime(1474538269) | ||
->setName('code') | ||
->setBackupExtension('tgz'); | ||
|
||
$this->assertTrue($this->filesystem->rollback()); | ||
$this->assertTrue(file_exists($rootDir . '/' . $fileName)); | ||
} | ||
} |
Binary file added
BIN
+336 Bytes
...tion/testsuite/Magento/Framework/Backup/_files/var/backups/1474538269_filesystem_code.tgz
Binary file not shown.
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