Skip to content

Commit a2dad9a

Browse files
committed
Upgrade to PHPUnit 9
1 parent 9880e44 commit a2dad9a

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Complete documentation and more examples are available in [the wiki](https://git
3232

3333
## Requirements
3434

35-
- PHP >= 5.6
35+
- PHP >= 7.3
3636
- [intl extension](http://php.net/manual/en/book.intl.php) is recommended for `humanReadable()` but not strictly required
3737

3838
## Installation

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "^8.0",
25+
"phpunit/phpunit": "^9.0",
2626
"phpmd/phpmd" : "@stable"
2727
}
2828
}

tests/RRuleTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,8 +2269,12 @@ public function quirkyRfcStrings()
22692269
*/
22702270
public function testQuirkyRfcStringsParserNotice($str,$occurrences)
22712271
{
2272-
$this->expectException(\PHPUnit\Framework\Error\Notice::class);
2273-
$rule = new RRule($str);
2272+
try {
2273+
$rule = new RRule($str);
2274+
$this->fail("Expected an notice, didn't get one");
2275+
} catch (\PHPUnit\Framework\Error\Notice $e) {
2276+
$this->assertStringContainsString("This string is not compliant with the RFC (DTSTART cannot be part of RRULE).", $e->getMessage());
2277+
}
22742278
}
22752279

22762280
/**

tests/RSetTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,12 @@ public function quirkyRfcStrings()
858858
*/
859859
public function testParseQuirkyRfcStringNotice($string, $occurrences)
860860
{
861-
$this->expectException(\PHPUnit\Framework\Error\Notice::class);
862-
863-
$object = new RSet($string);
861+
try {
862+
$object = new RSet($string);
863+
$this->fail("Expected an notice, didn't get one");
864+
} catch (\PHPUnit\Framework\Error\Notice $e) {
865+
$this->assertStringContainsString("This string is not compliant with the RFC (DTSTART cannot be part of RRULE).", $e->getMessage());
866+
}
864867
}
865868

866869
/**

0 commit comments

Comments
 (0)