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
Commits
260ec84b
Commit
260ec84b
authored
11 months ago
by
Florent Torregrosa
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3437169
by oldeb, Grimreaper: Fix tests
parent
fd510130
No related branches found
No related tags found
1 merge request
!12
Issue #3437169 by oldeb, Grimreaper: Fix tests
Pipeline
#200327
passed with warnings
11 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/ExecuteCodeTest.php
+7
-6
7 additions, 6 deletions
tests/src/Functional/ExecuteCodeTest.php
with
7 additions
and
6 deletions
tests/src/Functional/ExecuteCodeTest.php
+
7
−
6
View file @
260ec84b
...
...
@@ -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.'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment