What I want to do is checking whether a link is exist on frontpage.
I've set up a content with with node id 5 as my frontpage.
But when testing it, and see the verbose message (http://screencast.com/t/ldWSBwJNcO) different page appear. The default drupal frontpage appear instead of the content that I've set up.
My test code:
class MyUserManagementTestCase extends DrupalWebTestCase {
// Some says this improve tests performance
protected $profile = 'test';
public static function getInfo() {
return array(
'name' => 'My User Management Test Case',
'description' => 'Ensure that the My functionality for user management works.',
'group' => 'My',
);
}
public function setUp() {
parent::setUp();
}
public function testFrontpage() {
$this->drupalGet('');
$this->assertResponse(200, t('Frontpage page is accessible'));
$this->assertLinkByHref('user/register');
$this->assertLinkByHref('user/login');
}
}