function testPageNotFound() {
$this
->drupalLogin($this->admin_user);
$this
->drupalGet($this
->randomName(10));
$this
->assertText(t('Page not found'), 'Found the default 404 page');
// Use a custom 404 page.
$edit = array(
'site_404' => 'user/' . $this->admin_user->uid,
);
$this
->drupalPost('admin/config/system/site-information', $edit, t('Save configuration'));
$this
->drupalGet($this
->randomName(10));
$this
->assertText($this->admin_user->name, 'Found the custom 404 page');
}