Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
4da678eb
Unverified
Commit
4da678eb
authored
Jan 23, 2019
by
Alex Pott
Browse files
Issue
#2981870
by Lendude, alexpott: Duplicate BrokenSetUpTest for BrowserTestBase
parent
56658f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/simpletest/src/Tests/BrokenSetUpTest.php
View file @
4da678eb
...
...
@@ -12,7 +12,7 @@
* database tables. Therefore, we ensure that tests which are not set up
* properly are skipped.
*
* @group
simpletest
* @group
WebTestBase
* @see \Drupal\simpletest\WebTestBase
*/
class
BrokenSetUpTest
extends
WebTestBase
{
...
...
core/tests/Drupal/Tests/Core/Test/BrowserTestBaseTest.php
View file @
4da678eb
...
...
@@ -79,4 +79,22 @@ public function testGetHttpClientException() {
$ref_gethttpclient
->
invoke
(
$btb
);
}
/**
* Test that tearDown doesn't call cleanupEnvironment if setUp is not called.
*
* @covers ::tearDown
*/
public
function
testTearDownWithoutSetUp
()
{
$method
=
'cleanupEnvironment'
;
$this
->
assertTrue
(
method_exists
(
BrowserTestBase
::
class
,
$method
));
$btb
=
$this
->
getMockBuilder
(
BrowserTestBase
::
class
)
->
disableOriginalConstructor
()
->
setMethods
([
$method
])
->
getMockForAbstractClass
();
$btb
->
expects
(
$this
->
never
())
->
method
(
$method
);
$ref_tearDown
=
new
\
ReflectionMethod
(
$btb
,
'tearDown'
);
$ref_tearDown
->
setAccessible
(
TRUE
);
$ref_tearDown
->
invoke
(
$btb
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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