You are here

public function ViewModePageTestCase::testAddPattern in View Mode Page 8.2

Same name and namespace in other branches
  1. 7.2 view_mode_page.test \ViewModePageTestCase::testAddPattern()

Test adding a pattern with the non-entity based function

File

./view_mode_page.test, line 86

Class

ViewModePageTestCase
Tests

Code

public function testAddPattern() {

  // make sure we have no patterns
  $this
    ->assertNumberOfPatterns(0);

  // add a pattern
  view_mode_page_add_pattern('blog_post', 'teaser', 'blog/%/teaser');

  // // make sure we have 1 pattern
  $this
    ->assertNumberOfPatterns(1);

  // check out pattern
  $this
    ->assertPattern('blog_post', 'teaser', 'blog/%/teaser');
}