Ejemplo n.º 1
0
 /**
  * @runInSeparateProcess
  */
 public function testRedirect()
 {
     $randomUrl = 'http://random.test?r=' . rand();
     $headers_list = xdebug_get_headers();
     $this->assertNotContains("Location: {$randomUrl}", $headers_list);
     OpauthStrategy::redirect($randomUrl, false);
     $headers_list = xdebug_get_headers();
     $this->assertContains("Location: {$randomUrl}", $headers_list);
 }
 /**
  * @runInSeparateProcess
  */
 public function testRedirect()
 {
     if (!extension_loaded('xdebug')) {
         $this->markTestSkipped('Xdebug extension is not loaded.');
     }
     $randomUrl = 'http://random.test?r=' . rand();
     $headers_list = xdebug_get_headers();
     $this->assertNotContains("Location: {$randomUrl}", $headers_list);
     OpauthStrategy::redirect($randomUrl, false);
     $headers_list = xdebug_get_headers();
     $this->assertContains("Location: {$randomUrl}", $headers_list);
 }