Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devel_php
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
devel_php
Merge requests
!12
Issue
#3437169
by oldeb, Grimreaper: Fix tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3437169
by oldeb, Grimreaper: Fix tests
issue/devel_php-3437169:3437169-failling-testoutputbuffer
into
8.x-1.x
Overview
0
Commits
2
Pipelines
3
Changes
1
Merged
Florent Torregrosa
requested to merge
issue/devel_php-3437169:3437169-failling-testoutputbuffer
into
8.x-1.x
11 months ago
Overview
0
Commits
2
Pipelines
3
Changes
1
Expand
Closes
#3437169
0
0
Merge request reports
Compare
8.x-1.x
version 1
19a2d429
11 months ago
8.x-1.x (base)
and
latest version
latest version
3ea5dc2d
2 commits,
11 months ago
version 1
19a2d429
1 commit,
11 months ago
1 file
+
7
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Functional/ExecuteCodeTest.php
+
7
−
6
Options
@@ -71,15 +71,15 @@ class ExecuteCodeTest extends BrowserTestBase {
$this
->
drupalGet
(
$url
);
$edit
[
'code'
]
=
'devel_help()'
;
$this
->
submitForm
(
$edit
,
$this
->
t
(
'Execute'
)
)
;
$this
->
submitForm
(
$edit
,
'Execute'
);
$this
->
assertSession
()
->
pageTextContains
(
'syntax error, unexpected end of file'
);
$edit
[
'code'
]
=
'devel_help2();'
;
$this
->
submitForm
(
$edit
,
$this
->
t
(
'Execute'
)
)
;
$this
->
submitForm
(
$edit
,
'Execute'
);
$this
->
assertSession
()
->
pageTextContains
(
'Call to undefined function devel_help2()'
);
$edit
[
'code'
]
=
'devel_help();'
;
$this
->
submitForm
(
$edit
,
$this
->
t
(
'Execute'
)
)
;
$this
->
submitForm
(
$edit
,
'Execute'
);
$this
->
assertSession
()
->
pageTextContains
(
'Too few arguments to function devel_help(), 0 passed'
);
}
@@ -87,16 +87,17 @@ class ExecuteCodeTest extends BrowserTestBase {
* Tests output buffer.
*/
public
function
testOutputBuffer
():
void
{
$edit
=
[];
$url
=
Url
::
fromRoute
(
'devel_php.execute_php'
);
$this
->
drupalLogin
(
$this
->
user
);
$this
->
drupalGet
(
$url
);
$this
->
assertSession
()
->
pageTextNotContains
(
\Drupal
::
VERSION
);
$edit
=
[];
$edit
[
'code'
]
=
'echo \Drupal::VERSION;'
;
$this
->
submitForm
(
$edit
,
$this
->
t
(
'Execute'
));
$this
->
assertSession
()
->
pageTextContains
(
\Drupal
::
VERSION
);
$this
->
submitForm
(
$edit
,
'Execute'
);
$elements
=
$this
->
xpath
(
'//div[@aria-label="Status message"]/pre/span[contains(text(), :message)]'
,
[
':message'
=>
\Drupal
::
VERSION
]);
$this
->
assertNotEmpty
(
$elements
,
'Dumped message is present.'
);
}
}
Loading