BlockExampleMenuTest.php
1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* @file
* Definition of Drupal\block_example\Tests\BlockExampleMenuTest.
*/
namespace Drupal\block_example\Tests;
use Drupal\simpletest\WebTestBase;
/**
* Test the user-facing menus in Block Example.
*
* @ingroup block_example
* @group block_example
* @group examples
*/
class BlockExampleMenuTest extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('block', 'block_example');
/**
* The installation profile to use with this test.
*
* This test class requires the "Tools" block.
*
* @var string
*/
protected $profile = 'minimal';
/**
* Test for a link to the block example in the Tools menu.
*/
public function testBlockExampleLink() {
$this->drupalGet('');
$this->assertLinkByHref('examples/block_example');
}
/**
* Tests block_example menus.
*/
public function testBlockExampleMenu() {
$this->drupalGet('examples/block_example');
$this->assertResponse(200, 'Description page exists.');
}
}