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)); }
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()); }
/** * @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()); }
protected function setUp() { S::destroy(); S::bootstrap('Saltwater\\Test\\Test'); }
public static function setUpBeforeClass() { S::destroy(); S::bootstrap(__DIR__ . '/deploy', 'Saltwater\\Blog\\Blog'); S::$n->db->nuke(); }
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'))); }
public static function setUpBeforeClass() { S::destroy(); S::bootstrap('Saltwater\\Test\\Test'); }