Skip to content

Instantly share code, notes, and snippets.

@undertext
Last active July 4, 2019 18:18
Show Gist options
  • Save undertext/2a4b005127ba3979604299a7547834f8 to your computer and use it in GitHub Desktop.
Save undertext/2a4b005127ba3979604299a7547834f8 to your computer and use it in GitHub Desktop.
<?php
namespace Drupal\tests\urban_module\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Tests urban definition list block.
*/
class UrbanDefinitionListBlockTest extends BrowserTestBase {
protected $profile = 'urban_profile';
/**
* Tests that block is correctly displayed on the frontpage.
*/
public function testBlock() {
$this->createNode([
'type' => 'urban_definition',
'title' => 'brb',
]);
$this->createNode([
'type' => 'urban_definition',
'title' => 'LMK',
]);
$this->drupalGet('<front>');
$assertSession = $this->assertSession();
$assertSession->pageTextContains('brb');
$assertSession->pageTextContains('LMK');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment