Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
7c79e1c4
Commit
7c79e1c4
authored
Sep 03, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2329765
by tim.plunkett | sun: Remove all @backup* annotations from (pure) unit tests.
parent
cc87280b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
+19
-1
No files found.
core/tests/Drupal/Tests/Core/Form/FormCacheTest.php
View file @
7c79e1c4
...
...
@@ -16,7 +16,6 @@
/**
* @coversDefaultClass \Drupal\Core\Form\FormCache
* @group Form
* @backupStaticAttributes enabled
*/
class
FormCacheTest
extends
UnitTestCase
{
...
...
@@ -75,6 +74,8 @@ class FormCacheTest extends UnitTestCase {
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
resetSafeMarkup
();
$this
->
moduleHandler
=
$this
->
getMock
(
'Drupal\Core\Extension\ModuleHandlerInterface'
);
$this
->
formCacheStore
=
$this
->
getMock
(
'Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface'
);
...
...
@@ -94,6 +95,14 @@ protected function setUp() {
$this
->
formCache
=
new
FormCache
(
$this
->
keyValueExpirableFactory
,
$this
->
moduleHandler
,
$this
->
account
,
$this
->
csrfToken
);
}
/**
* {@inheritdoc}
*/
protected
function
tearDown
()
{
parent
::
tearDown
();
$this
->
resetSafeMarkup
();
}
/**
* @covers ::getCache
*/
...
...
@@ -397,4 +406,13 @@ public function testSetCacheWithSafeStrings() {
$this
->
formCache
->
setCache
(
$form_build_id
,
$form
,
$form_state
);
}
/**
* Ensures SafeMarkup does not bleed from one test to another.
*/
protected
function
resetSafeMarkup
()
{
$property
=
(
new
\
ReflectionClass
(
'Drupal\Component\Utility\SafeMarkup'
))
->
getProperty
(
'safeStrings'
);
$property
->
setAccessible
(
TRUE
);
$property
->
setValue
(
array
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment