You are here

protected function CustomFilterTest::createFilter in Custom filter 8

Create a new filter.

1 call to CustomFilterTest::createFilter()
CustomFilterTest::testModule in src/Tests/CustomFilterTest.php
Run all the tests.

File

src/Tests/CustomFilterTest.php, line 49

Class

CustomFilterTest
Test the Custom Filter administration and use.

Namespace

Drupal\customfilter\Tests

Code

protected function createFilter() {
  $edit = array();
  $edit['id'] = 'test_filter';
  $edit['name'] = 'filter_name';
  $edit['cache'] = FALSE;
  $edit['description'] = 'filter description';
  $edit['shorttip'] = 'short tip';
  $edit['longtip'] = 'long tip';
  $this
    ->drupalPostForm('admin/config/content/customfilter/add', $edit, t('Save'));
  $this
    ->drupalGet('admin/config/content/customfilter');
  $this
    ->assertText("filter_name", 'Filter created with sucess');
}