示例#1
0
 public function testFireEventParameters()
 {
     $paramOne = 123;
     $paramTwo = 456;
     $this->_subscriberOne->expects($this->once())->method('testEvent')->with($paramOne, $paramTwo);
     $this->_subscriberTwo->expects($this->once())->method('testEvent')->with($paramOne, $paramTwo);
     $this->_eventManager->fireEvent('testEvent', array($paramOne, $paramTwo));
 }
示例#2
0
 /**
  * A test ended.
  * Method signature is implied by implemented interface, not all parameters are needed.
  *
  * @param  PHPUnit_Framework_Test $test
  * @param  float                  $time
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function endTest(PHPUnit_Framework_Test $test, $time)
 {
     if (!$test instanceof PHPUnit_Framework_TestCase || $test instanceof PHPUnit_Framework_Warning) {
         return;
     }
     $this->_eventManager->fireEvent('endTest', array($test), true);
 }
示例#3
0
 /**
  * Rollback transaction and fire 'rollbackTransaction' event
  */
 protected function _rollbackTransaction()
 {
     if ($this->_isTransactionActive) {
         $this->_getAdapter()->rollbackTransparentTransaction();
         $this->_isTransactionActive = false;
         $this->_eventManager->fireEvent('rollbackTransaction');
     }
 }
示例#4
0
 /**
  * Handler for 'core_app_init_current_store_after' event, that converts it into 'initStoreAfter'
  */
 public function initStoreAfter()
 {
     $this->_eventManager->fireEvent('initStoreAfter');
 }
示例#5
0
 /**
  * Handler for 'controller_front_init_before' event, that converts it into 'initFrontControllerBefore'
  */
 public function initFrontControllerBefore()
 {
     $this->_eventManager->fireEvent('initFrontControllerBefore');
 }