Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
e96e2eca
Unverified
Commit
e96e2eca
authored
5 months ago
by
Chris Sangwin
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1356 from catalyst/mockclassnames
Update mock class names
parents
b215c6e4
6a31a525
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/api_controller_test.php
+4
-4
4 additions, 4 deletions
tests/api_controller_test.php
with
4 additions
and
4 deletions
tests/api_controller_test.php
+
4
−
4
View file @
e96e2eca
...
@@ -84,7 +84,7 @@ class api_controller_test extends qtype_stack_testcase {
...
@@ -84,7 +84,7 @@ class api_controller_test extends qtype_stack_testcase {
$methods
[]
=
$method
->
name
;
$methods
[]
=
$method
->
name
;
}
}
$this
->
request
=
$this
->
getMockBuilder
(
RequestInt
::
class
)
$this
->
request
=
$this
->
getMockBuilder
(
RequestInt
::
class
)
->
setMockClassName
(
'Request'
)
->
setMockClassName
(
'Request
Test
'
)
->
setMethods
(
$methods
)
->
setMethods
(
$methods
)
->
getMock
();
->
getMock
();
// Need to use callback so data can be altered in each test.
// Need to use callback so data can be altered in each test.
...
@@ -101,7 +101,7 @@ class api_controller_test extends qtype_stack_testcase {
...
@@ -101,7 +101,7 @@ class api_controller_test extends qtype_stack_testcase {
}
}
$this
->
response
=
$this
->
getMockBuilder
(
ResponseInt
::
class
)
$this
->
response
=
$this
->
getMockBuilder
(
ResponseInt
::
class
)
->
setMockClassName
(
'Response'
)
->
setMockClassName
(
'Response
Test
'
)
->
setMethods
(
$methods
)
->
setMethods
(
$methods
)
->
getMock
();
->
getMock
();
...
@@ -112,7 +112,7 @@ class api_controller_test extends qtype_stack_testcase {
...
@@ -112,7 +112,7 @@ class api_controller_test extends qtype_stack_testcase {
}
}
$this
->
result
=
$this
->
getMockBuilder
(
StreamInt
::
class
)
$this
->
result
=
$this
->
getMockBuilder
(
StreamInt
::
class
)
->
setMockClassName
(
'StreamInterface'
)
->
setMockClassName
(
'StreamInterface
Test
'
)
->
setMethods
(
$methods
)
->
setMethods
(
$methods
)
->
getMock
();
->
getMock
();
...
@@ -252,7 +252,7 @@ class api_controller_test extends qtype_stack_testcase {
...
@@ -252,7 +252,7 @@ class api_controller_test extends qtype_stack_testcase {
$this
->
requestdata
[
'fileid'
]
=
1
;
$this
->
requestdata
[
'fileid'
]
=
1
;
$dc
=
$this
->
getMockBuilder
(
DownloadController
::
class
)
$dc
=
$this
->
getMockBuilder
(
DownloadController
::
class
)
->
setMockClassName
(
'DownloadController'
)
->
setMockClassName
(
'DownloadController
Test
'
)
->
setMethods
([
'set_headers'
])
->
setMethods
([
'set_headers'
])
->
getMock
();
->
getMock
();
...
...
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