Skip to content
Snippets Groups Projects
Unverified Commit 5785beda authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #13344 from seamuslee001/unit_test_13343

Add in unit test to support changes in UF API in PR 13343
parents c3ba729d ab24c42d
Branches
Tags
No related merge requests found
......@@ -929,6 +929,44 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
}
}
/**
* Test getlist works
* @dataProvider entities_get
* @param $Entity
*/
public function testGetList($Entity) {
if (in_array($Entity, $this->toBeImplemented['get'])
|| in_array($Entity, $this->toBeSkipped_getByID())
) {
return;
}
if (in_array($Entity, ['ActivityType', 'SurveyRespondant'])) {
$this->markTestSkipped();
}
$this->callAPISuccess($Entity, 'getlist', ['label_field' => 'id']);
}
/**
* Test getlist works when entity is lowercase
* @dataProvider entities_get
* @param $Entity
*/
public function testGetListLowerCaseEntity($Entity) {
if (in_array($Entity, $this->toBeImplemented['get'])
|| in_array($Entity, $this->toBeSkipped_getByID())
) {
return;
}
if (in_array($Entity, ['ActivityType', 'SurveyRespondant'])) {
$this->markTestSkipped();
}
if ($Entity == 'UFGroup') {
$Entity = 'ufgroup';
}
$this->callAPISuccess($Entity, 'getlist', ['label_field' => 'id']);
}
/**
* Create two entities and make sure we can fetch them individually by ID.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment