diff --git a/test/application/UI/Base/Layout/NavigationMenuTest.php b/test/application/UI/Base/Layout/NavigationMenuTest.php deleted file mode 100644 index 821befcaf..000000000 --- a/test/application/UI/Base/Layout/NavigationMenuTest.php +++ /dev/null @@ -1,67 +0,0 @@ - [ true ], - 'hide menu' => [ false ], - ]; - } - - /** - * @dataProvider IsAllowedProvider - * test used to make sure backward compatibility is ensured - */ - public function testIsAllowed($bExpectedIsAllowed=true){ - \MetaModel::GetConfig()->Set('navigation_menu.show_organization_filter', $bExpectedIsAllowed); - $oNavigationMenu = new NavigationMenu( - $this->createMock(ApplicationContext::class), - $this->createMock(PopoverMenu::class)); - - $isAllowed = $oNavigationMenu->IsSiloSelectionEnabled(); - $this->assertEquals($bExpectedIsAllowed, $isAllowed); - } - - public function testIsAllowed_BackwardCompatibility_NoVariableInConfFile(){ - \MetaModel::GetConfig()->Set('navigation_menu.show_organization_filter', false); - - $sTmpFilePath = tempnam(sys_get_temp_dir(), 'test_'); - $oInitConfig = \MetaModel::GetConfig(); - $oInitConfig->WriteToFile($sTmpFilePath); - - //remove variable for the test - $aLines = file($sTmpFilePath); - - $aRows = array(); - - foreach ($aLines as $key => $sLine) { - if (!preg_match('/navigation_menu.show_organization_filter/', $sLine)) { - $aRows[] = $sLine; - } - } - - file_put_contents($sTmpFilePath, implode("\n", $aRows)); - $oTempConfig = new \Config($sTmpFilePath); - - $isAllowed = $oTempConfig->Get('navigation_menu.show_organization_filter'); - - $this->assertEquals(true, $isAllowed); - unlink($sTmpFilePath); - } -} diff --git a/test/core/AttributeDefTest.php b/test/core/AttributeDefTest.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/setup/MFCompilerMenuTest.php b/tests/php-unit-tests/unitary-tests/setup/MFCompilerMenuTest.php similarity index 96% rename from test/setup/MFCompilerMenuTest.php rename to tests/php-unit-tests/unitary-tests/setup/MFCompilerMenuTest.php index ef71e8e6f..19f4e8b99 100644 --- a/test/setup/MFCompilerMenuTest.php +++ b/tests/php-unit-tests/unitary-tests/setup/MFCompilerMenuTest.php @@ -24,9 +24,9 @@ class MFCompilerMenuTest extends ItopTestCase { public function setUp(): void { parent::setUp(); - require_once APPROOT . 'setup/compiler.class.inc.php'; - require_once APPROOT . 'setup/modelfactory.class.inc.php'; - require_once APPROOT . 'application/utils.inc.php'; + require_once APPROOT.'setup/compiler.class.inc.php'; + require_once APPROOT.'setup/modelfactory.class.inc.php'; + require_once APPROOT.'application/utils.inc.php'; } public function tearDown(): void { diff --git a/test/setup/ressources/datamodels/delta_broken_menus.xml b/tests/php-unit-tests/unitary-tests/setup/ressources/datamodels/delta_broken_menus.xml similarity index 100% rename from test/setup/ressources/datamodels/delta_broken_menus.xml rename to tests/php-unit-tests/unitary-tests/setup/ressources/datamodels/delta_broken_menus.xml