if ($this->cache) {
$k2c = $this->cache->get($this->cacheKey);
}
- if (!is_array($k2c)) {
+ if (!isset($k2c) || !is_array($k2c)) {
$k2c = array();
$containerNames = array_reverse(array_keys($this->containers));
foreach ($containerNames as $name) {
<extension key='test.extension.manager.paymenttest' type='payment'>
<file>main</file>
<name>test_extension_manager_paymenttest</name>
+ <description>Sample Payment extension</description>
<typeInfo>
<userNameLabel>username</userNameLabel>
<passwordLabel>password</passwordLabel>
<isRecur>0</isRecur>
<paymentType>1</paymentType>
</typeInfo>
-</extension>
\ No newline at end of file
+</extension>
static $counts = array();
public function install() {
+ self::$counts['install'] = isset(self::$counts['install']) ? self::$counts['install'] : 0;
self::$counts['install'] = 1 + (int) self::$counts['install'];
}
public function uninstall() {
+ self::$counts['uninstall'] = isset(self::$counts['uninstall']) ? self::$counts['uninstall'] : 0;
self::$counts['uninstall'] = 1 + (int) self::$counts['uninstall'];
}
public function disable() {
+ self::$counts['disable'] = isset(self::$counts['disable']) ? self::$counts['disable'] : 0;
self::$counts['disable'] = 1 + (int) self::$counts['disable'];
}
public function enable() {
+ self::$counts['enable'] = isset(self::$counts['enable']) ? self::$counts['enable'] : 0;
self::$counts['enable'] = 1 + (int) self::$counts['enable'];
}
* Class CRM_Extension_Container_CollectionTest
*/
class CRM_Extension_Container_CollectionTest extends CiviUnitTestCase {
- //@todo make BAO enotice compliant & remove the line below
- // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE
- // new test classes should be compliant.
- public $_eNoticeCompliant = FALSE;
public function setUp() {
parent::setUp();
* Class CRM_Extension_Manager_ModuleTest
*/
class CRM_Extension_Manager_ModuleTest extends CiviUnitTestCase {
- //@todo make BAO enotice compliant & remove the line below
- // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE
- // new test classes should be compliant.
- public $_eNoticeCompliant = FALSE;
public function setUp() {
parent::setUp();
*/
public static function incHookCount($module, $name) {
global $_test_extension_manager_moduletest_counts;
+ if (!isset($_test_extension_manager_moduletest_counts[$module][$name])) {
+ $_test_extension_manager_moduletest_counts[$module][$name] = 0;
+ }
$_test_extension_manager_moduletest_counts[$module][$name] = 1 + (int) $_test_extension_manager_moduletest_counts[$module][$name];
}
* Class CRM_Extension_Manager_PaymentTest
*/
class CRM_Extension_Manager_PaymentTest extends CiviUnitTestCase {
- //@todo make BAO enotice compliant & remove the line below
- // WARNING - NEVER COPY & PASTE $_eNoticeCompliant = FALSE
- // new test classes should be compliant.
- public $_eNoticeCompliant = FALSE;
public function setUp() {
parent::setUp();
*/
public static $populateOnce = FALSE;
- /**
- * Allow classes to state E-notice compliance
- */
- public $_eNoticeCompliant = TRUE;
-
/**
* @var boolean DBResetRequired allows skipping DB reset
* in specific test case. If you still need
//flush component settings
CRM_Core_Component::getEnabledComponents(TRUE);
- if ($this->_eNoticeCompliant) {
- error_reporting(E_ALL);
- }
- else {
- error_reporting(E_ALL & ~E_NOTICE);
- }
+ error_reporting(E_ALL);
+
$this->_sethtmlGlobals();
}