From 745b795a992ffef1077dbe99dc854d5f303a5998 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 3 May 2014 08:18:23 -0700 Subject: [PATCH] test - flush pseudoconstant on case test, comments --- CRM/Case/PseudoConstant.php | 10 ++++++++-- CRM/Core/PseudoConstant.php | 16 ++++++++++------ tests/phpunit/CRM/Case/PseudoConstantTest.php | 1 + 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CRM/Case/PseudoConstant.php b/CRM/Case/PseudoConstant.php index e79e099378..8bade1c581 100644 --- a/CRM/Case/PseudoConstant.php +++ b/CRM/Case/PseudoConstant.php @@ -79,6 +79,11 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * * @access public * + * @param string $column + * @param bool $onlyActive + * @param null $condition + * @param bool $fresh + * * @return array - array reference of all case statues * @static */ @@ -103,6 +108,8 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * * @access public * + * @param null $filter + * * @return array - array reference of all redaction rules * @static */ @@ -250,8 +257,7 @@ class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant { * @access public * @static * - * @param boolean $name pseudoconstant to be flushed - * + * @param bool|string $name pseudoconstant to be flushed */ public static function flush($name = 'cache') { if (isset(self::$$name)) { diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 0213b7ce7d..f0df9aac37 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -531,12 +531,16 @@ class CRM_Core_PseudoConstant { * * Note: any database errors will be trapped by the DAO. * - * @param array $var the associative array we will fill - * @param string $name the name of the DAO - * @param boolean $all get all objects. default is to get only active ones. - * @param string $retrieve the field that we are interested in (normally name, differs in some objects) - * @param string $filter the field that we want to filter the result set with - * @param string $condition the condition that gets passed to the final query as the WHERE clause + * @param array $var the associative array we will fill + * @param string $name the name of the DAO + * @param boolean $all get all objects. default is to get only active ones. + * @param string $retrieve the field that we are interested in (normally name, differs in some objects) + * @param string $filter the field that we want to filter the result set with + * @param string $condition the condition that gets passed to the final query as the WHERE clause + * + * @param null $orderby + * @param string $key + * @param null $force * * @return void * @access public diff --git a/tests/phpunit/CRM/Case/PseudoConstantTest.php b/tests/phpunit/CRM/Case/PseudoConstantTest.php index c57f364b82..7e3c605834 100644 --- a/tests/phpunit/CRM/Case/PseudoConstantTest.php +++ b/tests/phpunit/CRM/Case/PseudoConstantTest.php @@ -19,6 +19,7 @@ class CRM_Case_PseudoConstantTest extends CiviUnitTestCase { } function testCaseType() { + CRM_Core_PseudoConstant::flush(); $caseTypes = CRM_Case_PseudoConstant::caseType(); $expectedTypes = array( 1 => 'Housing Support', -- 2.25.1