protected function YoastSeoTest::enableYoastSeo in Real-time SEO for Drupal 8
Enable Yoast SEO for a given bundle.
1 call to YoastSeoTest::enableYoastSeo()
- YoastSeoTest::testYoastSeoEnabledDisabled in src/
Tests/ YoastSeoTest.php - Only available when it has been previously enabled on the content type.
File
- src/
Tests/ YoastSeoTest.php, line 68
Class
- YoastSeoTest
- Ensures that the Yoast Seo works correctly.
Namespace
Drupal\yoast_seo\TestsCode
protected function enableYoastSeo($entity_type, $bundle) {
// Configure yoast seo for the given bundle.
$this
->drupalGet('admin/config/yoast_seo');
$edit = [
$entity_type . '[' . $bundle . ']' => $bundle,
];
json_decode($this
->drupalPostForm(NULL, $edit, t('Save')));
$this
->assertSession()
->checkboxChecked('edit-node-page');
}