Skip to content

Commit

Permalink
Merge pull request #26471 from eileenmcnaughton/legacy
Browse files Browse the repository at this point in the history
Use APIv4 when creating test entities
  • Loading branch information
eileenmcnaughton authored Jun 7, 2023
2 parents df11067 + f5a9e89 commit 83f2f3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/phpunit/CiviTest/CiviUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ public function createExternalAPI() {
* @return array|int
*/
protected function createTestEntity(string $entity, array $params, string $identifier = 'default') {
$params['version'] = 4;
$result = $this->callAPISuccess($entity, 'create', $params);
$this->setTestEntityID($entity, $result['id'], $identifier);
return reset($result['values']);
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/api/v3/PcpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function setUp(): void {
'contact_id' => 1,
'page_id' => 1,
'pcp_block_id' => 1,
'status_id:name' => 'Approved',
];
parent::setUp();
}
Expand Down

0 comments on commit 83f2f3c

Please sign in to comment.