Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5cbeff

Browse files
author
Wouter Wolters
committed
[TASK] Allow PHPunit 12
1 parent e9c3bc4 commit b5cbeff

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Classes/Core/BaseTestCase.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ protected function tearDown(): void
101101
* @param string $mockClassName the class name to use for the mock class
102102
* @param bool $callOriginalConstructor whether to call the constructor
103103
* @param bool $callOriginalClone whether to call the __clone method
104-
* @param bool $callAutoload whether to call any autoload function
105104
*
106105
* @return MockObject&AccessibleObjectInterface&T a mock of `$originalClassName` with access methods added
107106
*/
@@ -112,7 +111,6 @@ protected function getAccessibleMock(
112111
string $mockClassName = '',
113112
bool $callOriginalConstructor = true,
114113
bool $callOriginalClone = true,
115-
bool $callAutoload = true
116114
) {
117115
$mockBuilder = $this->getMockBuilder($this->buildAccessibleProxy($originalClassName))
118116
->setConstructorArgs($arguments)
@@ -132,10 +130,6 @@ protected function getAccessibleMock(
132130
$mockBuilder->disableOriginalClone();
133131
}
134132

135-
if (!$callAutoload) {
136-
$mockBuilder->disableAutoload();
137-
}
138-
139133
return $mockBuilder->getMock();
140134
}
141135

Tests/Unit/Core/PackageCollectionTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
namespace Typo3\TestingFramework\Tests\Unit\Core;
2525

26+
use PHPUnit\Framework\Attributes\Test;
2627
use PHPUnit\Framework\TestCase;
2728
use TYPO3\CMS\Core\Package\PackageManager;
2829
use TYPO3\CMS\Core\Service\DependencyOrderingService;
@@ -31,9 +32,7 @@
3132

3233
final class PackageCollectionTest extends TestCase
3334
{
34-
/**
35-
* @test
36-
*/
35+
#[Test]
3736
public function sortsComposerPackages(): void
3837
{
3938
$packageStates = require __DIR__ . '/../Fixtures/Packages/PackageStates.php';

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"php": "^8.2",
2929
"composer/class-map-generator": "^1.3.4",
3030
"guzzlehttp/psr7": "^2.5.0",
31-
"phpunit/phpunit": "^11.2.5",
31+
"phpunit/phpunit": "^11.2.5 || ^12.1.2",
3232
"psr/container": "^2.0",
3333
"typo3/cms-backend": "13.*.*@dev || 14.*.*@dev",
3434
"typo3/cms-core": "13.*.*@dev || 14.*.*@dev",

0 commit comments

Comments
 (0)