Esempio n. 1
0
 public function testAmOnSubdomain()
 {
     $this->module->_reconfigure(array('url' => 'http://google.com'));
     $this->module->amOnSubdomain('user');
     $this->assertEquals('http://user.google.com', $this->module->_getUrl());
     $this->module->_reconfigure(array('url' => 'http://www.google.com'));
     $this->module->amOnSubdomain('user');
     $this->assertEquals('http://user.google.com', $this->module->_getUrl());
 }
Esempio n. 2
0
 /**
  * @issue https://github.com/Codeception/Codeception/issues/2653
  */
 public function testSetCookiesByOptions()
 {
     $config = $this->module->_getConfig();
     $config['cookies'] = [['Name' => 'foo', 'Value' => 'bar1'], ['Name' => 'baz', 'Value' => 'bar2']];
     $this->module->_reconfigure($config);
     // this url redirects if cookies are present
     $this->module->amOnPage('/cookies');
     $this->module->seeCurrentUrlEquals('/info');
 }
Esempio n. 3
0
 public function testRedirectBaseUriHasPathAnd302Code()
 {
     // prepare config
     $config = $this->module->_getConfig();
     $config['url'] .= '/somepath';
     // append path to the base url
     $this->module->_reconfigure($config);
     $this->module->amOnPage('/redirect_base_uri_has_path_302');
     $this->module->seeResponseCodeIs(200);
     $this->module->seeCurrentUrlEquals('/somepath/info');
     $this->module->see('Lots of valuable data here');
 }