Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 18, 2024
1 parent 752ea06 commit 5bdc08f
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/Mage/Core/Model/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public function setUp(): void
$this->subject = Mage::getModel('core/config');
}

/**
* @group Mage_Core
* @group Mage_Core_Model
*/
public function testSaveDeleteGetConfig(): void
{
$path = 'test/config';
Expand Down
42 changes: 42 additions & 0 deletions tests/unit/Mage/Core/Model/UrlTest.php
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\Core\Model;

use Mage;
use Mage_Core_Model_Url;
use PHPUnit\Framework\TestCase;

class UrlTest extends TestCase
{
public Mage_Core_Model_Url $subject;

public function setUp(): void
{
Mage::app();
$this->subject = Mage::getModel('core/url');
}

/**
* @group Mage_Core
* @group Mage_Core_Model
*/
public function testGetSecure(): void
{
$this->assertIsBool($this->subject->getSecure());
}
}
42 changes: 42 additions & 0 deletions tests/unit/Mage/Core/Model/VariableTest.php
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\Core\Model;

use Mage;
use Mage_Core_Model_Variable;
use PHPUnit\Framework\TestCase;

class VariableTest extends TestCase
{
public Mage_Core_Model_Variable $subject;

public function setUp(): void
{
Mage::app();
$this->subject = Mage::getModel('core/variable');
}

/**
* @group Mage_Core
* @group Mage_Core_Model
*/
public function testGetVariablesOptionArray(): void
{
$this->assertIsArray($this->subject->getVariablesOptionArray());
}
}

0 comments on commit 5bdc08f

Please sign in to comment.