protected function setUp()
 {
     $this->p1 = new Priority();
     $this->p2 = new Priority();
     RegistrationListener::addCallback($this->p1, 10);
     RegistrationListener::addCallback($this->p2, 0);
     parent::setUp();
 }
 protected function setUp()
 {
     $this->p1 = new SecondPriority();
     $this->p2 = new SecondPriority();
     // Note.  Registration callbacks should not be set in a test case.  They should be set in a module's
     // require_once or composer autoload.
     RegistrationListener::addCallback($this->p2, 0);
     RegistrationListener::addCallback($this->p1, 10);
     parent::setUp();
 }
 protected function setUp()
 {
     self::addBaseNamespace('Magium\\Magento');
     RegistrationListener::addCallback(new Registration(), 100);
     parent::setUp();
 }
Example #4
0
 protected function executeCallbacks(AbstractTestCase $testCase)
 {
     RegistrationListener::executeCallbacks($testCase);
 }
Example #5
0
<?php

require_once __DIR__ . '/../../vendor/autoload.php';
class AbstractTestCaseRegistrationCallback implements \Magium\Util\TestCase\RegistrationCallbackInterface
{
    public static $callCount = 0;
    protected $internalCallCount = 0;
    public function register(\Magium\AbstractTestCase $testCase)
    {
        $this->internalCallCount++;
        self::$callCount = $this->internalCallCount;
    }
}
\Magium\Util\TestCase\RegistrationListener::addCallback(new AbstractTestCaseRegistrationCallback());