-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
848 additions
and
37 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,45 @@ | ||
<?php | ||
|
||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category OpenMage | ||
* @package OpenMage_Tests | ||
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenMage\Tests\Unit\Base; | ||
|
||
use Generator; | ||
use Mage; | ||
use Mage_Adminhtml_Block_Dashboard; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DefaultConfigTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider provideGetStoreConfig | ||
* @group Base | ||
* @group Default_Config | ||
*/ | ||
public function testGetStoreConfig(string $expectedResult, string $path, $store = null): void | ||
{ | ||
$this->assertSame($expectedResult, Mage::getStoreConfig($path, $store)); | ||
} | ||
|
||
|
||
public function provideGetStoreConfig(): Generator | ||
{ | ||
yield Mage_Adminhtml_Block_Dashboard::XML_PATH_ENABLE_CHARTS => [ | ||
'1', | ||
Mage_Adminhtml_Block_Dashboard::XML_PATH_ENABLE_CHARTS | ||
]; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category OpenMage | ||
* @package OpenMage_Tests | ||
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenMage\Tests\Unit\Mage\Adminhtml\Block; | ||
|
||
use Mage; | ||
use Mage_Adminhtml_Block_Cache; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CacheTest extends TestCase | ||
{ | ||
public Mage_Adminhtml_Block_Cache $subject; | ||
|
||
public function setUp(): void | ||
{ | ||
Mage::app(); | ||
// phpcs:ignore Ecg.Classes.ObjectInstantiation.DirectInstantiation | ||
$this->subject = new Mage_Adminhtml_Block_Cache(); | ||
} | ||
|
||
/** | ||
* @group Mage_Adminhtml | ||
* @group Mage_Adminhtml_Block | ||
* @group runInSeparateProcess | ||
* @runInSeparateProcess | ||
*/ | ||
public function testGetFlushStorageUrl(): void | ||
{ | ||
$this->assertStringStartsWith('http', $this->subject->getFlushStorageUrl()); | ||
} | ||
|
||
/** | ||
* @group Mage_Adminhtml | ||
* @group Mage_Adminhtml_Block | ||
* @group runInSeparateProcess | ||
* @runInSeparateProcess | ||
*/ | ||
public function testGetFlushSystemUrl(): void | ||
{ | ||
$this->assertStringStartsWith('http', $this->subject->getFlushSystemUrl()); | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
|
||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category OpenMage | ||
* @package OpenMage_Tests | ||
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenMage\Tests\Unit\Mage\Catalog\Helper; | ||
|
||
use Mage; | ||
use Mage_Catalog_Helper_Category; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CategoryTest extends TestCase | ||
{ | ||
public Mage_Catalog_Helper_Category $subject; | ||
|
||
public function setUp(): void | ||
{ | ||
Mage::app(); | ||
$this->subject = Mage::helper('catalog/category'); | ||
} | ||
|
||
/** | ||
* @group Mage_Catalog | ||
* @group Mage_Catalog_Helper | ||
*/ | ||
public function testCanUseCanonicalTag(): void | ||
{ | ||
$this->assertIsBool($this->subject->canUseCanonicalTag()); | ||
} | ||
} |
Oops, something went wrong.