From 8168545f1bdbb546ee842b2560f1dbad380fc524 Mon Sep 17 00:00:00 2001 From: Sean Madsen Date: Sat, 13 May 2017 13:42:57 -0500 Subject: [PATCH] CRM-20570 Add unit test for disabling of PCP --- tests/phpunit/api/v3/PcpTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/phpunit/api/v3/PcpTest.php b/tests/phpunit/api/v3/PcpTest.php index 73d0da3d51ef..fe6d3e5f6905 100644 --- a/tests/phpunit/api/v3/PcpTest.php +++ b/tests/phpunit/api/v3/PcpTest.php @@ -68,6 +68,15 @@ public function testCreatePcp() { $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. *