Пример #1
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');
 }
Пример #2
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');
 }