. * */ namespace OC\AppFramework\Http; use OCP\AppFramework\Http; //require_once(__DIR__ . "/../classloader.php"); class RedirectResponseTest extends \PHPUnit_Framework_TestCase { protected $response; protected function setUp(){ $this->response = new RedirectResponse('/url'); } public function testHeaders() { $headers = $this->response->getHeaders(); $this->assertEquals('/url', $headers['Location']); $this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT, $this->response->getStatus()); } public function testGetRedirectUrl(){ $this->assertEquals('/url', $this->response->getRedirectUrl()); } }