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()); }
/** * Get facebook test user be logged in on facebook. * This is done by going to facebook.com * * @throws ModuleConfigException */ public function haveTestUserLoggedInOnFacebook() { if (!array_key_exists('id', $this->testUser)) { throw new ModuleException(__CLASS__, 'Facebook test user was not found. Did you forget to create one?'); } $callbackUrl = $this->browserModule->_getUrl(); $this->browserModule->amOnUrl('https://facebook.com/login'); $this->browserModule->submitForm('#login_form', ['email' => $this->grabFacebookTestUserEmail(), 'pass' => $this->grabFacebookTestUserPassword()]); // if login in successful we are back on login screen: $this->browserModule->dontSeeInCurrentUrl('/login'); $this->browserModule->amOnUrl($callbackUrl); }