--- edit_metadata_fix_plus_tests-1876992-22.patch 2013-01-01 03:40:57.434892421 +0100 +++ edit_metadata_fix_plus_tests-1876992-25.patch 2013-01-01 04:14:33.555893701 +0100 @@ -1,11 +1,3 @@ - .../edit/Access/EditEntityFieldAccessCheck.php | 3 +- - .../edit/lib/Drupal/edit/MetadataGenerator.php | 3 +- - .../edit/lib/Drupal/edit/Tests/EditTestBase.php | 93 +++++++++++++++ - .../lib/Drupal/edit/Tests/EditorSelectionTest.php | 79 +------------ - .../Drupal/edit/Tests/MetadataGeneratorTest.php | 118 ++++++++++++++++++++ - .../edit_test/MockEditEntityFieldAccessCheck.php | 27 +++++ - 6 files changed, 244 insertions(+), 79 deletions(-) - diff --git a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php b/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php index 82726c3..9eac5bc 100644 --- a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php @@ -141,14 +133,15 @@ index 0000000..294da17 + } +} diff --git a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php -index a5a2992..a9cae10 100644 +index db26798..5217b92 100644 --- a/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php +++ b/core/modules/edit/lib/Drupal/edit/Tests/EditorSelectionTest.php -@@ -7,14 +7,12 @@ +@@ -7,15 +7,13 @@ namespace Drupal\edit\Tests; -use Drupal\simpletest\DrupalUnitTestBase; + use Drupal\edit\Plugin\ProcessedTextEditorManager; use Drupal\edit\EditorSelector; /** @@ -160,7 +153,7 @@ index a5a2992..a9cae10 100644 /** * The editor selector object to be tested. -@@ -23,13 +21,6 @@ class EditorSelectionTest extends DrupalUnitTestBase { +@@ -24,13 +22,6 @@ class EditorSelectionTest extends DrupalUnitTestBase { */ protected $editorSelector; @@ -169,12 +162,12 @@ index a5a2992..a9cae10 100644 - * - * @var array - */ -- public static $modules = array('system', 'entity', 'field_test', 'field', 'number', 'text', 'editor', 'edit', 'edit_test'); +- public static $modules = array('system', 'entity', 'field_test', 'field', 'number', 'text', 'edit', 'edit_test'); - public static function getInfo() { return array( 'name' => 'In-place field editor selection', -@@ -38,82 +29,16 @@ public static function getInfo() { +@@ -39,18 +30,9 @@ public static function getInfo() { ); } @@ -190,10 +183,13 @@ index a5a2992..a9cae10 100644 - // Set default storage backend. - variable_set('field_storage_default', $this->default_storage); - - $this->editorSelector = new EditorSelector(); + // @todo Rather than using the real ProcessedTextEditorManager, which can + // find all text editor plugins in the codebase, create a mock one for + // testing that is populated with only the ones we want to test. +@@ -60,66 +42,10 @@ function setUp() { } -- -- /** + + /** - * Creates a field and an instance of it. - * - * @param string $field_name @@ -249,7 +245,7 @@ index a5a2992..a9cae10 100644 - ->save(); - } - - /** +- /** * Retrieves the FieldInstance object for the given field and returns the * editor that Edit selects. */