Esempio n. 1
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 public function setUp()
 {
     parent::setUp();
     static::$sent = 0;
     $this->serviceManager = new ServiceManager();
     $this->serviceManager->setService('Configuration', $this->dataConfig)->setService('SiteInfo', new SiteInfo($this->dataSiteInfo))->setAlias('Zork\\Db\\SiteInfo', 'SiteInfo')->setFactory('Zork\\Mail\\Service', 'Zork\\Mail\\ServiceFactory')->setFactory('Zork\\Log\\LoggerManager', 'Zork\\Log\\LoggerServiceFactory');
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->dbDriverMock = null;
     $this->dbPlatformMock = null;
     $this->dbConnectionMock = null;
     $this->dbAdapterMock = null;
 }
Esempio n. 3
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 public function setUp()
 {
     parent::setUp();
     if (empty(static::$helperClass) || !class_exists(static::$helperClass)) {
         throw new PHPUnit_Framework_Exception(sprintf('%s: view-helper class "%s" does not exists', __METHOD__, static::$helperClass));
     }
     $this->viewMock = $this->getMock(static::$rendererClass);
     if (method_exists($this->viewMock, 'plugin')) {
         $this->viewMock->expects($this->any())->method('plugin')->will($this->returnCallback(array($this, 'plugin')));
     }
     $this->helper = $this->createHelper();
     $this->pluginInstances = array();
 }