Esempio n. 1
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Db();
     $this->instance->setDI($di = new DI());
     $this->instance->register();
 }
Esempio n. 2
0
 public function setUp()
 {
     DI::reset();
     DI::setDefault($di = new DI());
     $this->instance = m::mock('Phalcore\\Di\\Facade');
     $di->setShared('foo', m::mock('foo'));
 }
 public function setUp()
 {
     DI::reset();
     $this->instance = new LoadEnvironmentVariables();
     $this->instance->setDI($di = new DI());
     $this->application = m::mock('Phalcore\\Mvc\\Application')->makePartial();
     $di->setShared('application', $this->application);
 }
 public function setUp()
 {
     DI::reset();
     $this->instance = new ExceptionHandler();
     $this->instance->setDI($di = new DI());
     $di->setShared('config', m::mock('Phalcon\\Config'));
     $this->instance->register();
 }
Esempio n. 5
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Module();
     $this->instance->setDI($di = new DI());
     $di->setShared('application', m::mock('Phalcore\\Mvc\\Application')->makePartial());
     $this->instance->register();
 }
 public function setUp()
 {
     DI::reset();
     $this->instance = new RegisterConfig();
     $this->instance->setDI($di = new DI());
     $this->application = m::mock('Phalcore\\Mvc\\Application')->makePartial();
     $di->setShared('application', $this->application);
     $this->instance->boot();
 }
Esempio n. 7
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Router();
     $this->instance->setDI($di = new DI());
     $config = m::mock('Phalcore\\Config');
     $config->files = m::mock('Phalcon\\Config');
     $config->files->routes = APP_PATH . '/config/routes.php';
     $di->setShared('config', $config);
     $this->instance->register();
 }
Esempio n. 8
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Dispatcher();
     $this->instance->setDI($di = new DI());
     $config = m::mock('Phalcon\\Config')->makePartial();
     $config->offsetSet('namespaces', ['controllers' => 'barFoo']);
     $di->setShared('config', $config);
     $di->setShared('router', m::mock('Phalcore\\Mvc\\Router')->makePartial());
     $this->instance->register();
 }
Esempio n. 9
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Logger();
     $this->instance->setDI($di = new DI());
     $config = m::mock('Phalcon\\Config');
     $config->files = m::mock('Phalcon\\Config');
     $config->files->logs = m::mock('Phalcon\\Config');
     $config->files->logs->error = APP_PATH . '/trash/foo';
     $di->setShared('config', $config);
     $this->instance->register();
 }
Esempio n. 10
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new View();
     $this->instance->setDI($di = new DI());
     $config = m::mock('Phalcon\\Config');
     $config->paths = m::mock('Phalcon\\Config');
     $config->debug = true;
     $config->paths->cache = 'foo/cache';
     $config->paths->views = 'foo/views';
     $this->config = $config;
     $di->setShared('config', $config);
     $this->instance->register();
 }
Esempio n. 11
0
 public function setUp()
 {
     DI::reset();
     $this->setInstance();
 }
Esempio n. 12
0
 public function setUp()
 {
     DI::reset();
     $this->instance = new Application('.', 'config.php', $this->di = new DI());
 }
Esempio n. 13
0
 public function setUp()
 {
     DI::reset();
     DI::setDefault($di = new DI());
     $di->setShared('config', $this->config = m::mock('Phalcon\\Config'));
 }