Skip to content

Commit 8fd6de8

Browse files
Merge pull request #122 from mirko-pagliai/develop-phpunit
updated `phpunit` to `^10.5.5 || ^11.1.3`
2 parents a4029e3 + 87b6de1 commit 8fd6de8

File tree

8 files changed

+308
-237
lines changed

8 files changed

+308
-237
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
* added tests for php 8.4;
1616
* all chainable methods of `BackupExport` and `BackupImport` classes now have the typehint for returning self. Updated
1717
descriptions;
18-
* updated `psalm` to `6.x`.
18+
* updated `phpunit` to `^10.5.5 || ^11.1.3`;
19+
* updated `psalm` to `6.x`;
1920
* uses `cakedc/cakephp-phpstan`;
2021
* the old `FrozenTime` classes have been replaced with `DateTime` (which it was an alias for);
2122
* extensive revision of descriptions and tags of all classes and methods;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"cakephp/cakephp-codesniffer": "^5.0",
2222
"cakedc/cakephp-phpstan": "^3.2",
2323
"cakephp/migrations": "^4.0",
24-
"phpunit/phpunit": "^10.1.0 <=10.5.3",
24+
"phpunit/phpunit": "^10.5.5 || ^11.1.3",
2525
"phpstan/phpstan": "^1.10.38",
2626
"vimeo/psalm": "^5.15.0|~6.0"
2727
},

composer.lock

Lines changed: 295 additions & 231 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/TestCase/Command/DeleteAllCommandTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
use Cake\Console\TestSuite\ConsoleIntegrationTestTrait;
1919
use DatabaseBackup\TestSuite\TestCase;
20+
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
2021

2122
/**
2223
* DeleteAllCommandTest class
@@ -55,6 +56,7 @@ public function testExecute(): void
5556
* @test
5657
* @uses \DatabaseBackup\Command\DeleteAllCommand::execute()
5758
*/
59+
#[WithoutErrorHandler]
5860
public function testExecuteIsDeprecated(): void
5961
{
6062
$this->deprecated(function (): void {

tests/TestCase/Command/ExportCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use DatabaseBackup\Command\ExportCommand;
2424
use DatabaseBackup\TestSuite\TestCase;
2525
use DatabaseBackup\Utility\BackupExport;
26+
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
2627

2728
/**
2829
* ExportCommandTest class
@@ -134,11 +135,10 @@ public function testExecuteSendOption(): void
134135
}
135136

136137
/**
137-
* Test for `execute()` method, the `send` option is deprecated
138-
*
139138
* @test
140139
* @uses \DatabaseBackup\Command\ExportCommand::execute()
141140
*/
141+
#[WithoutErrorHandler]
142142
public function testExecuteSendOptionIsDeprecated(): void
143143
{
144144
$this->deprecated(function (): void {

tests/TestCase/Command/SendCommandTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Cake\Console\TestSuite\ConsoleIntegrationTestTrait;
1818
use Cake\Core\Configure;
1919
use DatabaseBackup\TestSuite\TestCase;
20+
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
2021

2122
/**
2223
* SendCommandTest class.
@@ -56,6 +57,7 @@ public function testExecute(): void
5657
* @test
5758
* @uses \DatabaseBackup\Command\SendCommand::execute()
5859
*/
60+
#[WithoutErrorHandler]
5961
public function testExecuteIsDeprecated(): void
6062
{
6163
$this->deprecated(function (): void {

tests/TestCase/Utility/BackupExportTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use DatabaseBackup\Driver\Sqlite;
2222
use DatabaseBackup\TestSuite\TestCase;
2323
use DatabaseBackup\Utility\BackupExport;
24+
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
2425
use Symfony\Component\Process\Exception\ProcessTimedOutException;
2526
use Symfony\Component\Process\Process;
2627

@@ -134,11 +135,10 @@ public function testSend(): void
134135
}
135136

136137
/**
137-
* Tests for `send()` method, is deprecated
138-
*
139138
* @test
140139
* @uses \DatabaseBackup\Utility\BackupExport::send()
141140
*/
141+
#[WithoutErrorHandler]
142142
public function testSendIsDeprecated(): void
143143
{
144144
$this->deprecated(function (): void {

tests/TestCase/Utility/BackupManagerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use DatabaseBackup\Utility\BackupExport;
2323
use DatabaseBackup\Utility\BackupManager;
2424
use InvalidArgumentException;
25+
use PHPUnit\Framework\Attributes\WithoutErrorHandler;
2526
use Symfony\Component\Filesystem\Filesystem;
2627

2728
/**
@@ -181,6 +182,7 @@ public function testSend(): void
181182
* @test
182183
* @uses \DatabaseBackup\Utility\BackupManager::send()
183184
*/
185+
#[WithoutErrorHandler]
184186
public function testSendIsDeprecated(): void
185187
{
186188
Configure::write('DatabaseBackup.mailSender', 'sender@example.com');

0 commit comments

Comments
 (0)