Skip to content

Commit 1e7a0d4

Browse files
author
Michael A. Smith
committed
Disable Events without Disabling Event Capture
Signed-off-by: Michael A. Smith <msmith3@ebay.com>
1 parent 0a8932d commit 1e7a0d4

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • app/code/community/EcomDev/PHPUnit/Model

app/code/community/EcomDev/PHPUnit/Model/App.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ public function initTest()
225225
$this->replaceRegistry(self::REGISTRY_PATH_SHARED_STORAGE, new Varien_Object());
226226
return $this;
227227
}
228-
228+
229229
/**
230230
* Sets cache options for test case
231-
*
231+
*
232232
* @param array $options
233233
* @return EcomDev_PHPUnit_Model_App
234234
*/
@@ -243,7 +243,7 @@ public function setCacheOptions(array $options)
243243

244244
/**
245245
* Retrieve cache options for test case
246-
*
246+
*
247247
* @return array
248248
*/
249249
public function getCacheOptions()
@@ -358,7 +358,7 @@ public function removeEventArea($code)
358358

359359
/**
360360
* Returns request for test suite
361-
*
361+
*
362362
* @see Mage_Core_Model_App::getRequest()
363363
* @return EcomDev_PHPUnit_Controller_Request_Http
364364
*/
@@ -376,7 +376,7 @@ public function getRequest()
376376

377377
/**
378378
* Returns response for test suite
379-
*
379+
*
380380
* @see Mage_Core_Model_App::getResponse()
381381
* @return EcomDev_PHPUnit_Controller_Response_Http
382382
*/
@@ -527,14 +527,14 @@ public function dispatchEvent($eventName, $args)
527527
{
528528
if ($this->_eventsEnabled) {
529529
parent::dispatchEvent($eventName, $args);
530+
}
530531

531-
if (!isset($this->_dispatchedEvents[$eventName])) {
532-
$this->_dispatchedEvents[$eventName] = 0;
533-
}
534-
535-
$this->_dispatchedEvents[$eventName]++;
532+
if (!isset($this->_dispatchedEvents[$eventName])) {
533+
$this->_dispatchedEvents[$eventName] = 0;
536534
}
537535

536+
$this->_dispatchedEvents[$eventName]++;
537+
538538
return $this;
539539
}
540540

0 commit comments

Comments
 (0)