4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
7 | This work is published under the GNU AGPLv3 license with some |
8 | permitted exceptions and without any warranty. For full license |
9 | and copyright information, see https://civicrm.org/licensing |
10 +--------------------------------------------------------------------+
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
20 namespace api\v
4\Entity
;
22 use api\v
4\UnitTestCase
;
23 use Civi\Api4\Extension
;
28 class ExtensionTest
extends UnitTestCase
{
30 public function testGet() {
31 $moduleTest = Extension
::get(FALSE)
32 ->addWhere('key', '=', 'test.extension.manager.moduletest')
33 ->execute()->single();
34 $this->assertEquals('test_extension_manager_moduletest', $moduleTest['label']);
35 $this->assertEquals(['mock'], $moduleTest['tags']);
37 $moduleTest = Extension
::get(FALSE)
38 ->addWhere('file', '=', 'moduletest')
39 ->execute()->single();
40 $this->assertEquals('test_extension_manager_moduletest', $moduleTest['label']);
41 $this->assertEquals(['mock'], $moduleTest['tags']);