Facebook\InstantArticles\Elements\InstantArticleTest::setUp PHP Метод

setUp() защищенный Метод

protected setUp ( )
    protected function setUp()
    {
        date_default_timezone_set('UTC');
        $inline = '<h1>Some custom code</h1>' . '<script>alert("test & more test");</script>';
        $this->article = InstantArticle::create()->withCanonicalUrl('http://foo.com/article.html')->withStyle('myarticlestyle')->withHeader(Header::create()->withTitle('Big Top Title')->withSubTitle('Smaller SubTitle')->withPublishTime(Time::create(Time::PUBLISHED)->withDatetime(\DateTime::createFromFormat('j-M-Y G:i:s', '14-Aug-1984 19:30:00')))->withModifyTime(Time::create(Time::MODIFIED)->withDatetime(\DateTime::createFromFormat('j-M-Y G:i:s', '10-Feb-2016 10:00:00')))->addAuthor(Author::create()->withName('Author Name')->withDescription('Author more detailed description'))->addAuthor(Author::create()->withName('Author in FB')->withDescription('Author user in facebook')->withURL('http://facebook.com/author'))->withKicker('Some kicker of this article')->withCover(Image::create()->withURL('https://jpeg.org/images/jpegls-home.jpg')->withCaption(Caption::create()->appendText('Some caption to the image'))))->addChild(Paragraph::create()->appendText('Some text to be within a paragraph for testing.'))->addChild(Paragraph::create()->appendText('Other text to be within a second paragraph for testing.'))->addChild(Paragraph::create())->addChild(Paragraph::create()->appendText(" \n \t "))->addChild(SlideShow::create()->addImage(Image::create()->withURL('https://jpeg.org/images/jpegls-home.jpg'))->addImage(Image::create()->withURL('https://jpeg.org/images/jpegls-home2.jpg'))->addImage(Image::create()->withURL('https://jpeg.org/images/jpegls-home3.jpg')))->addChild(Paragraph::create()->appendText('Some text to be within a paragraph for testing.'))->addChild(Ad::create()->withSource('http://foo.com'))->addChild(Paragraph::create()->appendText('Other text to be within a second paragraph for testing.'))->addChild(Analytics::create()->withHTML($inline))->withFooter(Footer::create()->withCredits('Some plaintext credits.'));
    }