public function apply($transformer, $instant_article, $element)
 {
     $footer = Footer::create();
     $instant_article->withFooter($footer);
     $transformer->transform($footer, $element);
     return $instant_article;
 }
 public function testFooter()
 {
     $footer = Footer::create();
     $expected = '';
     $result = $footer->render();
     $this->assertEquals($expected, $result);
     $warnings = array();
     InstantArticleValidator::getReport(array($footer), $warnings);
     $this->assertEquals(1, count($warnings));
     $this->assertContains('Footer must have at least one of the', $warnings[0]->__toString());
 }
 public function getContextClass()
 {
     return Footer::getClassName();
 }
 /**
  * Sets the footer content to this InstantArticle
  *
  * @param Footer $footer to be added to this Article.
  *
  * @return $this
  */
 public function withFooter($footer)
 {
     Type::enforce($footer, Footer::getClassName());
     $this->footer = $footer;
     return $this;
 }