Exemplo n.º 1
0
 /**
  * Initializes the aspect kernel.
  *
  * @return void
  */
 public function initializeAspectKernel()
 {
     $cacheTypes = Mage::app()->useCache();
     $aspectKernel = Danslo_Aop_Aspect_Kernel::getInstance();
     $aspectKernel->init(array('debug' => Mage::getIsDeveloperMode() || empty($cacheTypes[self::AOP_CACHE_TYPE]), 'cacheDir' => $this->_getCacheDir()));
     self::$initialized = true;
 }
Exemplo n.º 2
0
 /**
  * Set up AOP tests.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     // Make sure the AspectKernel is always initialized.
     Danslo_Aop_Model_Observer::initializeAspectKernel();
     // Because fixtures can change for every test, reconfigure AOP
     // with possibly new aspects.
     $kernel = Danslo_Aop_Aspect_Kernel::getInstance();
     $kernel->configureAop($kernel->getContainer());
 }
Exemplo n.º 3
0
 /**
  * Initializes the aspect kernel.
  *
  * @return void
  */
 public static function initializeAspectKernel()
 {
     if (self::$initialized) {
         return;
     }
     $cacheTypes = Mage::app()->useCache();
     $aspectKernel = Danslo_Aop_Aspect_Kernel::getInstance();
     $aspectKernel->init(array('debug' => Mage::getIsDeveloperMode() || empty($cacheTypes[self::AOP_CACHE_TYPE]), 'cacheDir' => self::_getCacheDir(), 'excludePaths' => [Mage::getBaseDir() . DS . 'vendor' . DS . 'phpunit', Mage::getBaseDir() . DS . 'app']));
     self::$initialized = true;
 }