From: Sean Madsen Date: Sat, 13 May 2017 18:42:57 +0000 (-0500) Subject: CRM-20570 Add unit test for disabling of PCP X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8168545f1bdbb546ee842b2560f1dbad380fc524;p=civicrm-core.git CRM-20570 Add unit test for disabling of PCP --- diff --git a/tests/phpunit/api/v3/PcpTest.php b/tests/phpunit/api/v3/PcpTest.php index 73d0da3d51..fe6d3e5f69 100644 --- a/tests/phpunit/api/v3/PcpTest.php +++ b/tests/phpunit/api/v3/PcpTest.php @@ -68,6 +68,15 @@ class api_v3_PcpTest extends CiviUnitTestCase { $this->getAndCheck($this->params, $result['id'], $this->entity); } + /** + * Test disable a PCP succeeds. + */ + public function testDisablePcp() { + $result = civicrm_api3('Pcp', 'create', $this->params); + civicrm_api3('Pcp', 'create', array('id' => $result['id'], 'is_active' => 0)); + $this->getAndCheck($this->params + array('is_active' => 0), $result['id'], $this->entity); + } + /** * Test get function succeeds. *