diff options
author | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2020-06-04 11:01:00 -0300 |
commit | fc7369835258467bf97eb64f184b93691f9a9fd5 (patch) | |
tree | daabd60089d2dd76d9f5fb416b005fbe159c799d /www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php |
first commit
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php new file mode 100644 index 00000000..8f7ecd00 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ext/api4/tests/phpunit/Entity/EntityTest.php @@ -0,0 +1,35 @@ +<?php + +namespace Civi\Test\Api4\Entity; + +use Civi\Api4\Entity; +use Civi\Test\Api4\UnitTestCase; + +/** + * @group headless + */ +class EntityTest extends UnitTestCase { + + public function testEntityGet() { + $result = Entity::get() + ->setCheckPermissions(FALSE) + ->execute() + ->indexBy('name'); + $this->assertArrayHasKey('Entity', $result, + "Entity::get missing itself"); + $this->assertArrayHasKey('Participant', $result, + "Entity::get missing Participant"); + } + + public function testEntity() { + $result = Entity::getActions() + ->setCheckPermissions(FALSE) + ->execute() + ->indexBy('name'); + $this->assertNotContains( + 'create', + array_keys((array) $result), + "Entity entity has more than basic actions"); + } + +} |