Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
3c1490b3
Commit
3c1490b3
authored
7 years ago
by
Phy
Browse files
Options
Downloads
Patches
Plain Diff
remove createMock & createPartialMock polyfill, dropping support for PHPUnit 5.7-
parent
1f1591cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_test/core/DokuWikiTest.php
+4
-33
4 additions, 33 deletions
_test/core/DokuWikiTest.php
with
4 additions
and
33 deletions
_test/core/DokuWikiTest.php
+
4
−
33
View file @
3c1490b3
<?php
if
(
!
class_exists
(
'PHPUnit_Framework_TestCase'
))
{
/**
* phpunit 5/6 compatibility
*/
class
PHPUnit_Framework_TestCase
extends
PHPUnit\Framework\TestCase
{
/**
* setExpectedException is deprecated in PHPUnit 6
*
* @param string $class
* @param null|string $message
*/
...
...
@@ -19,10 +19,10 @@ if(!class_exists('PHPUnit_Framework_TestCase')) {
}
}
/**
* Helper class to provide basic functionality for tests
*
* @uses PHPUnit_Framework_TestCase and thus PHPUnit 5.7+ is required
*/
abstract
class
DokuWikiTest
extends
PHPUnit_Framework_TestCase
{
...
...
@@ -150,35 +150,6 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase {
$INPUT
=
new
Input
();
}
/**
* Compatibility for older PHPUnit versions
*
* @param string $originalClassName
* @return PHPUnit_Framework_MockObject_MockObject
*/
protected
function
createMock
(
$originalClassName
)
{
if
(
is_callable
(
array
(
'parent'
,
'createMock'
)))
{
return
parent
::
createMock
(
$originalClassName
);
}
else
{
return
$this
->
getMock
(
$originalClassName
);
}
}
/**
* Compatibility for older PHPUnit versions
*
* @param string $originalClassName
* @param array $methods
* @return PHPUnit_Framework_MockObject_MockObject
*/
protected
function
createPartialMock
(
$originalClassName
,
array
$methods
)
{
if
(
is_callable
(
array
(
'parent'
,
'createPartialMock'
)))
{
return
parent
::
createPartialMock
(
$originalClassName
,
$methods
);
}
else
{
return
$this
->
getMock
(
$originalClassName
,
$methods
);
}
}
/**
* Waits until a new second has passed
*
...
...
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