Skip to content

feat: Support PHPUnit 11 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
},
"require": {
"php": ">=5.6",
"php-mock/php-mock": "^2.4",
"phpunit/php-text-template": "^1 || ^2 || ^3"
"php-mock/php-mock": "^2.5",
"phpunit/php-text-template": "^1 || ^2 || ^3 || ^4"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9 || ^10"
"phpunit/phpunit": "^5.7.27 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11"
},
"archive": {
"exclude": ["/tests"]
Expand Down
27 changes: 4 additions & 23 deletions tests/MockDelegateFunctionBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class MockDelegateFunctionBuilderTest extends TestCase

/**
* Test build() defines a class.
*
* @test
*/
public function testBuild()
{
Expand All @@ -29,8 +27,6 @@ public function testBuild()

/**
* Test build() would never create the same class name for different signatures.
*
* @test
*/
public function testDiverseSignaturesProduceDifferentClasses()
{
Expand All @@ -53,8 +49,6 @@ public function testDiverseSignaturesProduceDifferentClasses()

/**
* Test build() would create the same class name for identical signatures.
*
* @test
*/
public function testSameSignaturesProduceSameClass()
{
Expand All @@ -72,7 +66,6 @@ public function testSameSignaturesProduceSameClass()
/**
* Tests declaring a class with enabled backupStaticAttributes.
*
* @test
* @backupStaticAttributes enabled
* @dataProvider provideTestBackupStaticAttributes
*
Expand Down Expand Up @@ -100,29 +93,17 @@ public static function provideTestBackupStaticAttributes()
/**
* Tests deserialization.
*
* @test
* @runInSeparateProcess
* @dataProvider provideTestDeserializationInNewProcess
*
* @doesNotPerformAssertions
*/
public function testDeserializationInNewProcess($data)
{
unserialize($data);
}

/**
* Returns test cases for testDeserializationInNewProcess().
*
* @return array Test cases.
*/
public function provideTestDeserializationInNewProcess()
public function testDeserializationInNewProcess()
{
$builder = new MockDelegateFunctionBuilder();
$builder->build("min");

$data = serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()));

return [
[serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()))]
];
unserialize($data);
}
}