コード例 #1
0
 /**
  * Tests the JApplicationCms::redirect method with assorted URL's.
  *
  * @param   string  $url       @todo
  * @param   string  $base      @todo
  * @param   string  $request   @todo
  * @param   string  $expected  @todo
  *
  * @return  void
  *
  * @dataProvider  getRedirectData
  * @since   3.2
  */
 public function testRedirectWithUrl($url, $base, $request, $expected)
 {
     // Inject the client information.
     TestReflection::setValue($this->class, 'client', (object) array('engine' => JApplicationWebClient::GECKO));
     // Inject the internal configuration.
     $config = new Registry();
     $config->set('uri.base.full', $base);
     $config->set('uri.request', $request);
     TestReflection::setValue($this->class, 'config', $config);
     $this->class->redirect($url, false);
     $this->assertEquals('Location: ' . $expected, $this->class->headers[1][0]);
 }