From b86d70623ecd412a3bbf3849c92f119ce27e3cbd Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 13 Mar 2023 14:21:17 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B06097=20-=20Tests:=20Temporarily=20add=20?= =?UTF-8?q?test=20case=20for=20the=20new=20ItopCustomDatamodelTestCase=20c?= =?UTF-8?q?lass?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unitary-tests/core/TestGLATest.delta.xml | 14 +++++++ .../unitary-tests/core/TestGLATest.php | 39 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 tests/php-unit-tests/unitary-tests/core/TestGLATest.delta.xml create mode 100644 tests/php-unit-tests/unitary-tests/core/TestGLATest.php diff --git a/tests/php-unit-tests/unitary-tests/core/TestGLATest.delta.xml b/tests/php-unit-tests/unitary-tests/core/TestGLATest.delta.xml new file mode 100644 index 000000000..a69608f08 --- /dev/null +++ b/tests/php-unit-tests/unitary-tests/core/TestGLATest.delta.xml @@ -0,0 +1,14 @@ + + + + + + + tested_attribute + + true + + + + + diff --git a/tests/php-unit-tests/unitary-tests/core/TestGLATest.php b/tests/php-unit-tests/unitary-tests/core/TestGLATest.php new file mode 100644 index 000000000..10e876327 --- /dev/null +++ b/tests/php-unit-tests/unitary-tests/core/TestGLATest.php @@ -0,0 +1,39 @@ + + *
  • MakeGroupByQuery
  • + * + * + * @runTestsInSeparateProcesses + * @preserveGlobalState disabled + * @backupGlobals disabled + */ +class TestGLATest extends ItopCustomDatamodelTestCase +{ + /** + * @inheritDoc + */ + public function GetDatamodelDeltaAbsPath(): string + { + return APPROOT.'tests/php-unit-tests/unitary-tests/core/TestGLATest.delta.xml'; + } + + public function testFoo() + { + static::assertFalse(MetaModel::IsValidAttCode('Person', 'non_existing_attribute')); + static::assertTrue(MetaModel::IsValidAttCode('Person', 'tested_attribute')); + } +}