/** * Make sure that superuser is able to view the article. * * @depends testViewAccess */ public function testView() { $article = new Article(self::$articleId); $article->verify($this); $teaser_view = $article->view('teaser'); $this->assertArrayHasKey('body', $teaser_view, 'Article teaser does not show body field.'); $this->assertArrayHasKey('field_image', $teaser_view, 'Article teaser does not show image field.'); $this->assertArrayHasKey('field_tags', $teaser_view, 'Article teaser does not show tags field.'); $full_view = $article->view('full'); $this->assertArrayHasKey('body', $full_view, 'Article does not show body field.'); $this->assertArrayHasKey('field_image', $full_view, 'Article does not show image field.'); $this->assertArrayHasKey('field_tags', $full_view, 'Article teaser does not show tags field.'); }