/**
  * {@inheritdoc}
  */
 public function assertPageHasContent(StaticContent $staticContent)
 {
     $this->verify(['name' => $staticContent->getName()]);
     Assert::contains($this->getSession()->getPage()->getHtml(), $staticContent->getTitle());
     Assert::contains($this->getSession()->getPage()->getHtml(), $staticContent->getBody());
 }
 /**
  * @Then /^(this static content) should have body "([^"]+)"$/
  */
 public function thisStaticContentShouldHaveBody(StaticContent $staticContent, $body)
 {
     $this->updatePage->open(['id' => $staticContent->getId()]);
     Assert::same($this->updatePage->getBody(), $body);
 }
Example #3
0
 /**
  * @Given /^(it) is not published yet$/
  */
 public function itIsNotPublishedYet(StaticContent $staticContent)
 {
     $staticContent->setPublishable(false);
     $this->staticContentManager->flush();
 }