/** * @runInSeparateProcess * * @requires PHP 5.4 */ public function testHalt() { if ($GLOBALS['IS_HHVM']) { $this->markTestSkipped(); return; } S::halt('404', 'Not Found'); $this->assertEquals(404, http_response_code()); }
/** * Generic call for a type of provider * * @param string $type * @param string $caller Caller module name * * @return Provider */ public function provider($type, $caller = null) { $salt = 'provider.' . $type; if (!($bit = $this->registry->bit($salt))) { S::halt(500, 'provider does not exist: ' . $type); } if (empty($caller)) { $caller = $this->modules->finder->find(Backtrace::lastCaller(), $salt); } return $this->modules->finder->provider($bit, $caller, $type); }