You are here

public function MetatagTestBase::editByPathConfig in Metatag 7

Edits meta tags by path from a test_object.

Parameters

object $test_object: Metatag mapping object.

3 calls to MetatagTestBase::editByPathConfig()
MetatagContextTest::testFrontPage in metatag_context/tests/MetatagContextTest.test
Test handling the front page.
MetatagContextTest::testNode in metatag_context/tests/MetatagContextTest.test
Test handling a node.
MetatagContextWithI18nTest::testContextI18n in metatag_context/tests/MetatagContextWithI18nTest.test
Verify that strings are added to the translation system.

File

tests/MetatagTestBase.test, line 616
A base class for the Metatag tests, provides shared methods.

Class

MetatagTestBase
A base class for the Metatag tests, provides shared methods.

Code

public function editByPathConfig($test_object) {
  $edit = array(
    'paths' => $test_object->path,
    'metatags[und][title][value]' => $test_object->title,
    'metatags[und][description][value]' => $test_object->description,
    'metatags[und][abstract][value]' => $test_object->abstract,
    'metatags[und][keywords][value]' => $test_object->keywords,
  );
  $this
    ->drupalPost('admin/config/search/metatags/context/' . $test_object->name, $edit, t('Save'));
  $this
    ->assertResponse(200);
}