Same filename and directory in other branches
- 4.0.x modules/block_example/tests/src/Functional/BlockExampleMenuTest.php
Namespace
Drupal\Tests\block_example\Functional
File
-
modules/block_example/tests/src/Functional/BlockExampleMenuTest.php
View source
<?php
namespace Drupal\Tests\block_example\Functional;
use Drupal\Tests\BrowserTestBase;
class BlockExampleMenuTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
protected static $modules = [
'block',
'block_example',
];
protected $profile = 'minimal';
public function testBlockExampleLink() {
$this->drupalGet('');
$this->assertSession()
->linkByHrefExists('examples/block-example');
$this->drupalGet('examples/block-example');
$this->assertSession()
->statusCodeEquals(200);
$this->clickLink('the block admin page');
$this->assertSession()
->statusCodeEquals(403);
}
}
Classes