Exemplo n.º 1
0
 public function testServiceProvider()
 {
     S::bootstrap('Saltwater\\Root\\Root');
     S::$n->modules->append('Saltwater\\RedBean\\RedBean', true);
     $this->assertEquals('Saltwater\\RedBean\\Provider\\Entity', get_class(S::$n->entity));
     $this->assertEquals('Saltwater\\RedBean\\Provider\\Log', get_class(S::$n->log));
 }
Exemplo n.º 2
0
 public function testServiceProvider()
 {
     S::bootstrap('Saltwater\\Root\\Root');
     $context = S::$n->context->get('root');
     $this->assertEquals('Saltwater\\Root\\Context\\Root', get_class($context));
     $service = S::$n->service->get('info', $context);
     $this->assertEquals('Saltwater\\Root\\Service\\Info', get_class($service));
     $this->assertNull($service->getInfo());
 }
Exemplo n.º 3
0
 /**
  * @runInSeparateProcess
  *
  * @requires PHP 5.4
  */
 public function testMissingProvider()
 {
     if ($GLOBALS['IS_HHVM']) {
         $this->markTestSkipped();
         return;
     }
     S::destroy();
     S::bootstrap('Saltwater\\Root\\Root');
     S::$n->nosuchprovider;
     $this->assertEquals(500, http_response_code());
 }
Exemplo n.º 4
0
 protected function setUp()
 {
     S::destroy();
     S::bootstrap('Saltwater\\Test\\Test');
 }
Exemplo n.º 5
0
 public static function setUpBeforeClass()
 {
     S::destroy();
     S::bootstrap(__DIR__ . '/deploy', 'Saltwater\\Blog\\Blog');
     S::$n->db->nuke();
 }
Exemplo n.º 6
0
 public function testModuleActions()
 {
     S::bootstrap('Saltwater\\Root\\Root');
     S::addModules(array('Saltwater\\RedBean\\RedBean', 'Saltwater\\App\\App'));
     $this->assertEquals('Saltwater\\RedBean\\RedBean', get_class(S::$n->modules->get('redbean')));
 }
Exemplo n.º 7
0
 public static function setUpBeforeClass()
 {
     S::destroy();
     S::bootstrap('Saltwater\\Test\\Test');
 }