I wound up adding PcpBlock v4 api to write the test
In support of
#19096
*
* @package Civi\Api4
*/
-class PcpBlock extends Generic\DAOEntity {
+class PCPBlock extends Generic\DAOEntity {
}
if ($name === 'Im' || $name === 'Acl' || $name === 'Pcp') {
$name = strtoupper($name);
}
- if ($name === 'PcpBlock') {
- $name = 'PCPBlock';
- }
+
$dao = CRM_Core_DAO_AllCoreTables::getFullName($name);
if ($dao || !$name) {
return $dao;
*/
use Civi\Api4\Email;
+use Civi\Api4\PCPBlock;
/**
* Trait CRMTraits_PCP_PCPTestTrait
protected function createPCPBlock(array $params):int {
$blockParams = $this->pcpBlockParams();
$params = array_merge($this->pcpParams(), $params);
- $params['pcp_block_id'] = \Civi\Api4\PcpBlock::create()->setValues($blockParams)->execute()->first()['id'];
+ $params['pcp_block_id'] = PCPBlock::create()->setValues($blockParams)->execute()->first()['id'];
$pcp = CRM_PCP_BAO_PCP::create($params);
return (int) $pcp->id;