Exemple #1
0
 protected function setUp()
 {
     // Setup some variables that will be used throughout this method.
     $title = 'Blog Bug 409 [' . Core::RandomHex(6) . ']';
     $this->blog = new BlogModel();
     $this->blog->set('title', $title);
     // Make sure the page model has been loaded into this model too.
     $page = $this->blog->getLink('Page');
     $page->set('title', $title);
     $this->blog->save();
     $bacon = new BaconIpsumGenerator();
     // Create an article with an invalid title.
     $this->article = new BlogArticleModel();
     $this->article->setFromArray(['blogid' => $this->blog->get('id'), 'title' => 'Sömé "ḮnvÁlid" & \'Bad\' T¹tle!¡', 'body' => $bacon->getParagraphsAsMarkup(), 'status' => 'published']);
     $this->article->save();
 }