Creates a block in a language, check blocks page in all languages.
public function testBlockLinks() {
// Create admin user to be able to access block admin.
$admin_user = $this
->drupalCreateUser(array(
'administer blocks',
'access administration pages',
'administer news feeds',
'access news feeds',
'create article content',
'administer languages',
));
$this
->drupalLogin($admin_user);
// Create the block cache for all languages.
foreach ($this->langcodes as $langcode) {
$this
->drupalGet('admin/structure/block', array(
'language' => $langcode,
));
$this
->clickLink(t('Place blocks'));
}
// Create a feed in the default language.
$this
->createSampleNodes();
$feed = $this
->createFeed();
// Check that the block is listed for all languages.
foreach ($this->langcodes as $langcode) {
$this
->drupalGet('admin/structure/block', array(
'language' => $langcode,
));
$this
->clickLink(t('Place blocks'));
$this
->assertText($feed
->label());
}
}