Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
phpunit-hhi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
91 Carriage
phpunit-hhi
Commits
ac83c78f
Unverified
Commit
ac83c78f
authored
Sep 17, 2016
by
Simon Welsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to current PHPUnit 5.6 state
Depreacates a couple of methods, adds a new one and a couple of tests.
parent
9003a107
Pipeline
#160
passed with stages
in 1 minute and 37 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
108 additions
and
36 deletions
+108
-36
CHANGELOG.md
CHANGELOG.md
+5
-0
composer.lock
composer.lock
+35
-31
src/Framework/TestCase.hhi
src/Framework/TestCase.hhi
+11
-1
tests/TestCaseTest.php
tests/TestCaseTest.php
+14
-0
tests/runs/assert/bool/message.hhit
tests/runs/assert/bool/message.hhit
+4
-4
tests/runs/testcase/deprecated/hasPerformedExpectationsOnOutput.hhit
...testcase/deprecated/hasPerformedExpectationsOnOutput.hhit
+13
-0
tests/runs/testcase/deprecated/setExpectedException.hhit
tests/runs/testcase/deprecated/setExpectedException.hhit
+13
-0
tests/runs/testcase/deprecated/setExpectedExceptionRegExp.hhit
.../runs/testcase/deprecated/setExpectedExceptionRegExp.hhit
+13
-0
No files found.
CHANGELOG.md
View file @
ac83c78f
...
...
@@ -5,6 +5,11 @@
*
Updated to match PHPUnit 5.6
*
Added:
+
`PHPUnit_Framework_TestCase::createConfiguredMock`
+
`PHPUnit_Framework_TestCase::doesNotPerformAssertions`
*
Deprecated:
+
`PHPUnit_Framework_TestCase::hasPerformedExpectationsOnOutput`
+
`PHPUnit_Framework_TestCase::setExpectedException`
+
`PHPUnit_Framework_TestCase::setExpectedExceptionRegExp`
## 5.5.0
...
...
composer.lock
View file @
ac83c78f
...
...
@@ -64,16 +64,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.5.
1
",
"version": "1.5.
4
",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "
a8773992b362b58498eed24bf85005f363c34771
"
"reference": "
ea74994a3dc7f8d2f65a06009348f2d63c81e61f
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/
a8773992b362b58498eed24bf85005f363c34771
",
"reference": "
a8773992b362b58498eed24bf85005f363c34771
",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/
ea74994a3dc7f8d2f65a06009348f2d63c81e61f
",
"reference": "
ea74994a3dc7f8d2f65a06009348f2d63c81e61f
",
"shasum": ""
},
"require": {
...
...
@@ -102,7 +102,7 @@
"object",
"object graph"
],
"time": "201
5-11-20 12:04:31
"
"time": "201
6-09-16 13:37:59
"
},
{
"name": "phpdocumentor/reflection-common",
...
...
@@ -558,24 +558,24 @@
},
{
"name": "phpunit/phpunit",
"version": "
dev-master
",
"version": "
5.7.x-dev
",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "
467d048f06b50afe9b0de3a2855a7bd53b4aa63
c"
"reference": "
c2ad965fb0416aeb1e6bec481c054e1d8a5cf17
c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/
467d048f06b50afe9b0de3a2855a7bd53b4aa63
c",
"reference": "
467d048f06b50afe9b0de3a2855a7bd53b4aa63
c",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/
c2ad965fb0416aeb1e6bec481c054e1d8a5cf17
c",
"reference": "
c2ad965fb0416aeb1e6bec481c054e1d8a5cf17
c",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-
pcre
": "*",
"ext-
reflection
": "*",
"ext-
sp
l": "*",
"ext-
libxml
": "*",
"ext-
mbstring
": "*",
"ext-
xm
l": "*",
"myclabs/deep-copy": "~1.3",
"php": "^5.6 || ^7.0",
"phpspec/prophecy": "^1.3.1",
...
...
@@ -597,7 +597,11 @@
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
"phpunit/php-invoker": "~1.1"
},
"bin": [
...
...
@@ -606,7 +610,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.
6
.x-dev"
"dev-master": "5.
7
.x-dev"
}
},
"autoload": {
...
...
@@ -632,20 +636,20 @@
"testing",
"xunit"
],
"time": "2016-0
8-11 15:54:32
"
"time": "2016-0
9-08 05:22:30
"
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "3.2.
3
",
"version": "3.2.
7
",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "
b13d0d9426ced06958bd32104653526a6c998a52
"
"reference": "
546898a2c0c356ef2891b39dd7d07f5d82c8ed0a
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/
b13d0d9426ced06958bd32104653526a6c998a52
",
"reference": "
b13d0d9426ced06958bd32104653526a6c998a52
",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/
546898a2c0c356ef2891b39dd7d07f5d82c8ed0a
",
"reference": "
546898a2c0c356ef2891b39dd7d07f5d82c8ed0a
",
"shasum": ""
},
"require": {
...
...
@@ -691,7 +695,7 @@
"mock",
"xunit"
],
"time": "2016-0
6-12 07:37:26
"
"time": "2016-0
9-06 16:07:45
"
},
{
"name": "sebastian/code-unit-reverse-lookup",
...
...
@@ -856,23 +860,23 @@
},
{
"name": "sebastian/environment",
"version": "1.3.
7
",
"version": "1.3.
8
",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "
4e8f0da10ac5802913afc151413bc8c53b6c2716
"
"reference": "
be2c607e43ce4c89ecd60e75c6a85c126e754aea
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/
4e8f0da10ac5802913afc151413bc8c53b6c2716
",
"reference": "
4e8f0da10ac5802913afc151413bc8c53b6c2716
",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/
be2c607e43ce4c89ecd60e75c6a85c126e754aea
",
"reference": "
be2c607e43ce4c89ecd60e75c6a85c126e754aea
",
"shasum": ""
},
"require": {
"php": "
>=5.3.3
"
"php": "
^5.3.3 || ^7.0
"
},
"require-dev": {
"phpunit/phpunit": "
~4.4
"
"phpunit/phpunit": "
^4.8 || ^5.0
"
},
"type": "library",
"extra": {
...
...
@@ -902,7 +906,7 @@
"environment",
"hhvm"
],
"time": "2016-0
5-17 03:18:57
"
"time": "2016-0
8-18 05:49:44
"
},
{
"name": "sebastian/exporter",
...
...
@@ -1208,16 +1212,16 @@
},
{
"name": "symfony/yaml",
"version": "v3.1.
3
",
"version": "v3.1.
4
",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "
1819adf2066880c7967df7180f4f662b6f0567ac
"
"reference": "
f291ed25eb1435bddbe8a96caaef16469c2a092d
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/
1819adf2066880c7967df7180f4f662b6f0567ac
",
"reference": "
1819adf2066880c7967df7180f4f662b6f0567ac
",
"url": "https://api.github.com/repos/symfony/yaml/zipball/
f291ed25eb1435bddbe8a96caaef16469c2a092d
",
"reference": "
f291ed25eb1435bddbe8a96caaef16469c2a092d
",
"shasum": ""
},
"require": {
...
...
@@ -1253,7 +1257,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2016-0
7-17 14:02:08
"
"time": "2016-0
9-02 02:12:52
"
},
{
"name": "webmozart/assert",
...
...
src/Framework/TestCase.hhi
View file @
ac83c78f
...
...
@@ -23,6 +23,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
protected
function
checkRequirements
()
:
void
;
protected
function
createResult
()
:
PHPUnit_Framework_TestResult
;
public
function
dataDescription
()
:
string
;
public
function
doesNotPerformAssertions
()
:
bool
;
public
function
expectOutputRegex
(
?
string
$expectedRegex
)
:
void
;
public
function
expectOutputString
(
?
string
$expectedString
)
:
void
;
public
function
getActualOutput
()
:
string
;
...
...
@@ -47,6 +48,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public
function
hasFailed
()
:
bool
;
public
function
hasOutput
()
:
bool
;
public
function
hasSize
()
:
bool
;
<<
__Deprecated
(
'Use hasExpectationOnOutput() instead'
)
>>
public
function
hasPerformedExpectationsOnOutput
()
:
bool
;
protected
function
iniSet
(
string
$varName
,
string
$newValue
)
:
void
;
public
function
isInIsolation
()
:
bool
;
...
...
@@ -69,11 +71,19 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
public
function
setBeStrictAboutChangesToGlobalState
(
bool
$beStrictAboutChangeToGlobalState
,
)
:
void
;
<<
__Deprecated
(
'Use expectException() and expectExceptionMessage() instead'
)
>>
public
function
setExpectedException
<
T
>
(
?
classname
<
T
>
$name
,
?
string
$message
=
''
,
?
arraykey
$code
=
null
,
)
:
void
;
<<
__Deprecated
(
'Use expectException() and expectExceptionMessageRegExp() instead'
,
)
>>
public
function
setExpectedExceptionRegExp
<
T
>
(
?
classname
<
T
>
$name
,
string
$messageRegExp
=
''
,
...
...
@@ -120,7 +130,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert
protected
function
createConfiguredMock
<
T
>
(
classname
<
T
>
$originalClassName
,
array
$configuration
,
)
/*: PHPUnit_Framework_MockObject_MockObject*/
;
)
/*: PHPUnit_Framework_MockObject_MockObject*/
;
protected
function
createPartialMock
<
T
>
(
classname
<
T
>
$originalClassName
,
array
$methods
,
...
...
tests/TestCaseTest.php
View file @
ac83c78f
...
...
@@ -13,4 +13,18 @@ class TestCaseTest extends HHITest {
'testcase/deprecated/getMockWithoutInvokingTheOriginalConstructor'
,
);
}
public
function
testDeprecatedHasPerformedExpectationsOnOutput
()
:
void
{
$this
->
runTestFile
(
'testcase/deprecated/hasPerformedExpectationsOnOutput'
,
);
}
public
function
testDeprecatedSetExpectedException
()
:
void
{
$this
->
runTestFile
(
'testcase/deprecated/setExpectedException'
);
}
public
function
testDeprecatedSetExpectedExceptionRegExp
()
:
void
{
$this
->
runTestFile
(
'testcase/deprecated/setExpectedExceptionRegExp'
);
}
}
tests/runs/assert/bool/message.hhit
View file @
ac83c78f
...
...
@@ -8,7 +8,7 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
$this
->
assertFalse
(
false
,
0
);
$this
->
assertFalse
(
false
,
false
);
$this
->
assertFalse
(
false
,
4.3
);
$this
->
assertFalse
(
false
,
[]);
$this
->
assertFalse
(
false
,
[
1
]);
$this
->
assertFalse
(
false
,
$this
);
$this
->
assertFalse
(
false
,
null
);
}
...
...
@@ -19,7 +19,7 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
$this
->
assertTrue
(
false
,
0
);
$this
->
assertTrue
(
false
,
false
);
$this
->
assertTrue
(
false
,
4.3
);
$this
->
assertTrue
(
false
,
[]);
$this
->
assertTrue
(
false
,
[
1
]);
$this
->
assertTrue
(
false
,
$this
);
$this
->
assertTrue
(
false
,
null
);
}
...
...
@@ -30,12 +30,12 @@ class PHPUnit_Hhi_Test extends PHPUnit_Framework_TestCase {
7
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
int
.
8
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
bool
.
9
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
float
.
10
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
array
.
10
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
array
(
used
like
a
vector
)
.
11
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
object
of
type
PHPUnit_Hhi_Test
.
12
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
nullable
type
.
18
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
int
.
19
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
bool
.
20
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
float
.
21
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
array
.
21
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
array
(
used
like
a
vector
)
.
22
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
an
object
of
type
PHPUnit_Hhi_Test
.
23
:
4110
:
Invalid
argument
.
This
is
a
string
.
It
is
incompatible
with
a
nullable
type
.
tests/runs/testcase/deprecated/hasPerformedExpectationsOnOutput.hhit
0 → 100644
View file @
ac83c78f
---
FILE
---
<?
hh
// strict
class
PHPUnit_Hhi_Test
extends
PHPUnit_Framework_TestCase
{
public
function
testHasPerformedExpectationsOnOutput
()
:
void
{
$this
->
hasPerformedExpectationsOnOutput
();
}
}
---
PASS
---
0
---
ERRORS
---
5
:
4128
:
The
method
hasPerformedExpectationsOnOutput
is
deprecated
:
Use
hasExpectationOnOutput
()
instead
.
Definition
is
here
.
tests/runs/testcase/deprecated/setExpectedException.hhit
0 → 100644
View file @
ac83c78f
---
FILE
---
<?
hh
// strict
class
PHPUnit_Hhi_Test
extends
PHPUnit_Framework_TestCase
{
public
function
testSetExpectedException
()
:
void
{
$this
->
setExpectedException
(
self
::
class
,
'n'
);
}
}
---
PASS
---
0
---
ERRORS
---
5
:
4128
:
The
method
setExpectedException
is
deprecated
:
Use
expectException
()
and
expectExceptionMessage
()
instead
.
Definition
is
here
.
tests/runs/testcase/deprecated/setExpectedExceptionRegExp.hhit
0 → 100644
View file @
ac83c78f
---
FILE
---
<?
hh
// strict
class
PHPUnit_Hhi_Test
extends
PHPUnit_Framework_TestCase
{
public
function
testSetExpectedExceptionRegExp
()
:
void
{
$this
->
setExpectedExceptionRegExp
(
self
::
class
,
'n'
);
}
}
---
PASS
---
0
---
ERRORS
---
5
:
4128
:
The
method
setExpectedExceptionRegExp
is
deprecated
:
Use
expectException
()
and
expectExceptionMessageRegExp
()
instead
.
Definition
is
here
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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