Issue #1874664 by Wim Leers, jessebeach, Gábor Hojtsy, David_Rothstein, effulgentsia: partial rollback.

8.0.x
Dries 2013-02-16 13:29:42 -05:00
parent c5b33012ce
commit e1ade19286
4 changed files with 8 additions and 29 deletions

View File

@ -48,13 +48,6 @@ class FilterFormatAccessTest extends WebTestBase {
*/ */
protected $disallowed_format; protected $disallowed_format;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('contextual');
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Filter format access', 'name' => 'Filter format access',
@ -95,7 +88,6 @@ class FilterFormatAccessTest extends WebTestBase {
$this->web_user = $this->drupalCreateUser(array( $this->web_user = $this->drupalCreateUser(array(
'create page content', 'create page content',
'edit any page content', 'edit any page content',
'access contextual links',
filter_permission_name($this->allowed_format), filter_permission_name($this->allowed_format),
)); ));
@ -104,7 +96,6 @@ class FilterFormatAccessTest extends WebTestBase {
'administer filters', 'administer filters',
'create page content', 'create page content',
'edit any page content', 'edit any page content',
'access contextual links',
filter_permission_name($this->allowed_format), filter_permission_name($this->allowed_format),
filter_permission_name($this->disallowed_format), filter_permission_name($this->disallowed_format),
)); ));

View File

@ -14,13 +14,6 @@ class PageEditTest extends NodeTestBase {
protected $web_user; protected $web_user;
protected $admin_user; protected $admin_user;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('node', 'contextual');
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Node edit', 'name' => 'Node edit',
@ -32,8 +25,8 @@ class PageEditTest extends NodeTestBase {
function setUp() { function setUp() {
parent::setUp(); parent::setUp();
$this->web_user = $this->drupalCreateUser(array('edit own page content', 'create page content', 'access contextual links')); $this->web_user = $this->drupalCreateUser(array('edit own page content', 'create page content'));
$this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes', 'access contextual links')); $this->admin_user = $this->drupalCreateUser(array('bypass node access', 'administer nodes'));
} }
/** /**
@ -57,11 +50,14 @@ class PageEditTest extends NodeTestBase {
// Check that "edit" link points to correct page. // Check that "edit" link points to correct page.
$this->clickLink(t('Edit')); $this->clickLink(t('Edit'));
$edit_url = url("node/$node->nid/edit", array('absolute' => TRUE, 'query' => array('destination' => 'node/1'))); $edit_url = url("node/$node->nid/edit", array('absolute' => TRUE));
$actual_url = $this->getURL(); $actual_url = $this->getURL();
$this->assertEqual($edit_url, $actual_url, 'On edit page.'); $this->assertEqual($edit_url, $actual_url, 'On edit page.');
// Check that the title and body fields are displayed with the correct values. // Check that the title and body fields are displayed with the correct values.
$active = '<span class="element-invisible">' . t('(active tab)') . '</span>';
$link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active));
$this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.');
$this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.'); $this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
$this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.'); $this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');

View File

@ -1769,7 +1769,7 @@ function node_menu() {
'access arguments' => array('update', 1), 'access arguments' => array('update', 1),
'weight' => 0, 'weight' => 0,
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE, 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'file' => 'node.pages.inc', 'file' => 'node.pages.inc',
); );
$items['node/%node/delete'] = array( $items['node/%node/delete'] = array(
@ -1791,7 +1791,6 @@ function node_menu() {
'access arguments' => array(1), 'access arguments' => array(1),
'weight' => 2, 'weight' => 2,
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'node.pages.inc', 'file' => 'node.pages.inc',
); );
$items['node/%node/revisions/%node_revision/view'] = array( $items['node/%node/revisions/%node_revision/view'] = array(

View File

@ -12,13 +12,6 @@ namespace Drupal\taxonomy\Tests;
*/ */
class TermTest extends TaxonomyTestBase { class TermTest extends TaxonomyTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('taxonomy', 'contextual');
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'Taxonomy term functions and forms', 'name' => 'Taxonomy term functions and forms',
@ -29,7 +22,7 @@ class TermTest extends TaxonomyTestBase {
function setUp() { function setUp() {
parent::setUp(); parent::setUp();
$this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access', 'access contextual links')); $this->admin_user = $this->drupalCreateUser(array('administer taxonomy', 'bypass node access'));
$this->drupalLogin($this->admin_user); $this->drupalLogin($this->admin_user);
$this->vocabulary = $this->createVocabulary(); $this->vocabulary = $this->createVocabulary();