From afa33a287cebecaf3a7bc777df593262f08b2752 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Tue, 28 Apr 2015 20:38:10 -0600 Subject: [PATCH] All unit tests but one passing on SystemCheckTest --- tests/phpunit/api/v3/SystemCheckTest.php | 31 +++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/api/v3/SystemCheckTest.php b/tests/phpunit/api/v3/SystemCheckTest.php index 609aec35c0..3746c3a72b 100644 --- a/tests/phpunit/api/v3/SystemCheckTest.php +++ b/tests/phpunit/api/v3/SystemCheckTest.php @@ -52,8 +52,8 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { } /** - * Ensure that without any SystemPreference set, checkDefaultMailbox shows - * up. + * Ensure that without any StatusPreference set, checkDefaultMailbox shows + * up. */ public function testSystemCheckBasic() { $result = $this->callAPISuccess('System', 'check', array()); @@ -67,12 +67,12 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { } /** - * Permanently hushed items should never show up. + * Permanently hushed items should never show up. */ public function testSystemCheckHushForever() { $this->_params = array( 'name' => 'checkDefaultMailbox', - 'ignore_severity' => 4, + 'ignore_severity' => 7, ); $statusPreference = $this->callAPISuccess('StatusPreference', 'create', $this->_params); $result = $this->callAPISuccess('System', 'check', array()); @@ -81,6 +81,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayNotHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -102,6 +105,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayNotHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -123,6 +129,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -144,9 +153,10 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } - fwrite(STDERR, 'yesterday'); - fwrite(STDERR, print_r($yesterday->format('Y-m-d'), TRUE)); $this->assertArrayHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -165,6 +175,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayNotHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -184,6 +197,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayNotHasKey('name', $testedCheck, ' in line ' . __LINE__); } @@ -203,6 +219,9 @@ class api_v3_SystemCheckTest extends CiviUnitTestCase { $testedCheck = $check; break; } + else { + $testedCheck = array(); + } } $this->assertArrayNotHasKey('name', $testedCheck, ' in line ' . __LINE__); } -- 2.25.1