'test name', 'type' => 'entity_test', ]); $entity_test->save(); MetatagDefaults::create([ 'id' => 'entity_test__entity_test', 'tags' => [ 'keywords' => 'test', ], ])->save(); $this->drupalGet('metatag_test_custom_route/' . $entity_test->id()); $this->assertResponse(200); $xpath = $this->xpath("//meta[@name='keywords']"); $this->assertEqual(count($xpath), 1); $this->assertEqual((string) $xpath[0]->attributes()['content'], 'test'); } }