private function prepareSessionIfNeeded() { if (!$this->getSession()->getDriver() instanceof Selenium2Driver) { return; } if (false !== strpos($this->getSession()->getCurrentUrl(), $this->minkParameters['base_url'])) { return; } $this->homePage->open(); }
/** * @When /^I visit (this channel)'s homepage$/ */ public function iVisitChannelHomepage(ChannelInterface $channel) { $this->channelContextSetter->setChannel($channel); $this->homePage->open(); }
/** * @Then I should not see a homepage from :theme theme */ public function iShouldNotSeeThemedHomepage(ThemeInterface $theme) { $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'); expect($this->homePage->getContents())->notToBe($content); }