1
0
mirror of https://github.com/rlanvin/php-rrule.git synced 2025-02-26 15:54:14 +01:00

Upgrade to PHPUnit 9

This commit is contained in:
Rémi Lanvin 2024-06-23 21:25:36 +02:00
parent b4337c8935
commit 4274d19601
4 changed files with 14 additions and 7 deletions

View File

@ -32,7 +32,7 @@ Complete documentation and more examples are available in [the wiki](https://git
## Requirements ## Requirements
- PHP >= 5.6 - PHP >= 7.3
- [intl extension](http://php.net/manual/en/book.intl.php) is recommended for `humanReadable()` but not strictly required - [intl extension](http://php.net/manual/en/book.intl.php) is recommended for `humanReadable()` but not strictly required
## Installation ## Installation

View File

@ -22,7 +22,7 @@
} }
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.0", "phpunit/phpunit": "^9.0",
"phpmd/phpmd" : "@stable" "phpmd/phpmd" : "@stable"
} }
} }

View File

@ -2245,8 +2245,12 @@ class RRuleTest extends TestCase
*/ */
public function testQuirkyRfcStringsParserNotice($str,$occurrences) public function testQuirkyRfcStringsParserNotice($str,$occurrences)
{ {
$this->expectException(\PHPUnit\Framework\Error\Notice::class); try {
$rule = new RRule($str); $rule = new RRule($str);
$this->fail("Expected an notice, didn't get one");
} catch (\PHPUnit\Framework\Error\Notice $e) {
$this->assertStringContainsString("This string is not compliant with the RFC (DTSTART cannot be part of RRULE).", $e->getMessage());
}
} }
/** /**

View File

@ -858,9 +858,12 @@ class RSetTest extends TestCase
*/ */
public function testParseQuirkyRfcStringNotice($string, $occurrences) public function testParseQuirkyRfcStringNotice($string, $occurrences)
{ {
$this->expectException(\PHPUnit\Framework\Error\Notice::class); try {
$object = new RSet($string);
$object = new RSet($string); $this->fail("Expected an notice, didn't get one");
} catch (\PHPUnit\Framework\Error\Notice $e) {
$this->assertStringContainsString("This string is not compliant with the RFC (DTSTART cannot be part of RRULE).", $e->getMessage());
}
} }
/** /**