Skip to content

Commit ec6a00a

Browse files
feat: Support PHPUnit 11 (#10)
1 parent 35da84d commit ec6a00a

File tree

2 files changed

+7
-26
lines changed

2 files changed

+7
-26
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
},
2323
"require": {
2424
"php": ">=5.6",
25-
"php-mock/php-mock": "^2.4",
26-
"phpunit/php-text-template": "^1 || ^2 || ^3"
25+
"php-mock/php-mock": "^2.5",
26+
"phpunit/php-text-template": "^1 || ^2 || ^3 || ^4"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9 || ^10"
29+
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11"
3030
},
3131
"archive": {
3232
"exclude": ["/tests"]

tests/MockDelegateFunctionBuilderTest.php

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class MockDelegateFunctionBuilderTest extends TestCase
1717

1818
/**
1919
* Test build() defines a class.
20-
*
21-
* @test
2220
*/
2321
public function testBuild()
2422
{
@@ -29,8 +27,6 @@ public function testBuild()
2927

3028
/**
3129
* Test build() would never create the same class name for different signatures.
32-
*
33-
* @test
3430
*/
3531
public function testDiverseSignaturesProduceDifferentClasses()
3632
{
@@ -53,8 +49,6 @@ public function testDiverseSignaturesProduceDifferentClasses()
5349

5450
/**
5551
* Test build() would create the same class name for identical signatures.
56-
*
57-
* @test
5852
*/
5953
public function testSameSignaturesProduceSameClass()
6054
{
@@ -72,7 +66,6 @@ public function testSameSignaturesProduceSameClass()
7266
/**
7367
* Tests declaring a class with enabled backupStaticAttributes.
7468
*
75-
* @test
7669
* @backupStaticAttributes enabled
7770
* @dataProvider provideTestBackupStaticAttributes
7871
*
@@ -100,29 +93,17 @@ public static function provideTestBackupStaticAttributes()
10093
/**
10194
* Tests deserialization.
10295
*
103-
* @test
10496
* @runInSeparateProcess
105-
* @dataProvider provideTestDeserializationInNewProcess
10697
*
10798
* @doesNotPerformAssertions
10899
*/
109-
public function testDeserializationInNewProcess($data)
110-
{
111-
unserialize($data);
112-
}
113-
114-
/**
115-
* Returns test cases for testDeserializationInNewProcess().
116-
*
117-
* @return array Test cases.
118-
*/
119-
public function provideTestDeserializationInNewProcess()
100+
public function testDeserializationInNewProcess()
120101
{
121102
$builder = new MockDelegateFunctionBuilder();
122103
$builder->build("min");
104+
105+
$data = serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()));
123106

124-
return [
125-
[serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()))]
126-
];
107+
unserialize($data);
127108
}
128109
}

0 commit comments

Comments
 (0)