-
Notifications
You must be signed in to change notification settings - Fork 2
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
3 changed files
with
21 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* @package Tinebase | ||
* @license http://www.gnu.org/licenses/agpl.html | ||
* @copyright Copyright (c) 2013 - 2018 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* @copyright Copyright (c) 2013 - 2024 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* @copyright Copyright (c) 2014 Serpro (http://www.serpro.gov.br) | ||
* @author Flávio Gomes da Silva Lisboa <[email protected]> | ||
*/ | ||
|
@@ -15,9 +15,9 @@ | |
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestHelper.php'; | ||
|
||
/** | ||
* Test class for Tinebase_ModelConfiguration, using the test class from hr | ||
* Test class for HumanResources_ModelConfigurationTest | ||
*/ | ||
class HumanResources_ModelConfigurationTest extends \PHPUnit\Framework\TestCase | ||
class HumanResources_ModelConfigurationTest extends TestCase | ||
{ | ||
/** | ||
* tests if the modelconfiguration gets created using the static call | ||
|
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 |
---|---|---|
|
@@ -6,13 +6,15 @@ | |
* | ||
* @package Tinebase | ||
* @license http://www.gnu.org/licenses/agpl.html | ||
* @copyright Copyright (c) 2013-2021 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* @copyright Copyright (c) 2013-2024 Metaways Infosystems GmbH (http://www.metaways.de) | ||
* @author Alexander Stintzing <[email protected]> | ||
*/ | ||
class Tinebase_ModelConfigurationTest extends TestCase | ||
{ | ||
protected function tearDown(): void | ||
{ | ||
{ | ||
Tinebase_Application::getInstance()->setApplicationStatus('Sales', Tinebase_Application::ENABLED); | ||
|
||
parent::tearDown(); | ||
|
||
// reset mc config to prevent problems with following tests | ||
|
@@ -140,4 +142,14 @@ public function testConfigViaDefault() | |
self::assertTrue(isset($fields['sales_tax']['default']), print_r($fields['sales_tax'], true)); | ||
self::assertEquals(19.0, $fields['sales_tax']['default'], print_r($fields['sales_tax'], true)); | ||
} | ||
|
||
public function testModelExpanderWithoutRecordApp() | ||
{ | ||
// disable Sales | ||
Tinebase_Application::getInstance()->setApplicationStatus('Sales', Tinebase_Application::DISABLED); | ||
$inventoryMC = Inventory_Model_InventoryItem::getConfiguration(); | ||
if ($inventoryMC->jsonExpander) { | ||
self::assertArrayNotHasKey('invoice', $inventoryMC->jsonExpander['properties'], print_r($inventoryMC->jsonExpander, true)); | ||
} | ||
} | ||
} |
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