Skip to content

Commit 9a08aed

Browse files
committed
update stan & cleanup tests
1 parent 2314ece commit 9a08aed

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="phpstan" version="2.1.17" installed="2.1.17" location="./tools/phpstan" copy="false"/>
3+
<phar name="phpstan" version="2.1.31" installed="2.1.31" location="./tools/phpstan" copy="false"/>
44
</phive>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"require-dev": {
3737
"cakephp/authorization": "^3.0",
3838
"cakephp/cakephp-codesniffer": "^5.0",
39-
"phpunit/phpunit": "^10.5.5 || ^11.1.3"
39+
"phpunit/phpunit": "^10.5.32 || ^11.1.3 || ^12.0.9"
4040
},
4141
"suggest": {
4242
"ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use."

tests/TestCase/Middleware/DebugKitMiddlewareTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ public function testInvokeNoModifyBinaryResponse()
193193
$handler = $this->handler();
194194
$handler->expects($this->once())
195195
->method('handle')
196-
->will($this->returnCallback(function ($req) use ($response) {
196+
->willReturnCallback(function ($req) use ($response) {
197197
$stream = new CallbackStream(function () {
198198
return 'hi!';
199199
});
200200

201201
return $response->withBody($stream);
202-
}));
202+
});
203203
$middleware = new DebugKitMiddleware();
204204
$result = $middleware->process($request, $handler);
205205
$this->assertInstanceOf(Response::class, $result, 'Should return a response');

tests/TestCase/Model/Table/RequestTableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testGc()
8484
/** @var \PHPUnit\Framework\MockObject\MockObject&\DebugKit\Model\Table\RequestsTable $requestsTableMock */
8585
$requestsTableMock = $this->getMockForModel('DebugKit.Requests', ['shouldGc']);
8686
$requestsTableMock->method('shouldGc')
87-
->will($this->returnValue(true));
87+
->willReturn(true);
8888

8989
$data = array_fill(0, 10, [
9090
'url' => '/tasks/add',

tests/TestCase/Panel/IncludePanelTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class IncludePanelTest extends TestCase
3636
public function setUp(): void
3737
{
3838
parent::setUp();
39-
$this->panel = new IncludePanel();
39+
$this->deprecated(function () {
40+
$this->panel = new IncludePanel();
41+
});
4042
}
4143

4244
/**

tests/TestCase/Panel/SessionPanelTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public function testShutdownSkipAttributes()
5757

5858
$controller = new Controller($request);
5959
$event = new Event('Controller.shutdown', $controller);
60-
$this->panel->shutdown($event);
60+
$this->deprecated(function () use ($event) {
61+
$this->panel->shutdown($event);
62+
});
6163

6264
$data = $this->panel->data();
6365
$this->assertArrayHasKey('content', $data);

tests/bootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
]);
7272

7373
Cache::setConfig([
74-
'_cake_core_' => [
74+
'_cake_translations_' => [
7575
'engine' => 'File',
76-
'prefix' => 'cake_core_',
76+
'prefix' => 'cake_translations_',
7777
'serialize' => true,
7878
],
7979
'_cake_model_' => [

0 commit comments

Comments
 (0)