Skip to content

Commit

Permalink
Upgrade to PHPUnit 9
Browse files Browse the repository at this point in the history
  • Loading branch information
rlanvin committed Jun 23, 2024
1 parent b4337c8 commit 4274d19
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Complete documentation and more examples are available in [the wiki](https://git

## 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

## Installation
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"phpunit/phpunit": "^9.0",
"phpmd/phpmd" : "@stable"
}
}
8 changes: 6 additions & 2 deletions tests/RRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2245,8 +2245,12 @@ public function quirkyRfcStrings()
*/
public function testQuirkyRfcStringsParserNotice($str,$occurrences)
{
$this->expectException(\PHPUnit\Framework\Error\Notice::class);
$rule = new RRule($str);
try {
$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());
}
}

/**
Expand Down
9 changes: 6 additions & 3 deletions tests/RSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,12 @@ public function quirkyRfcStrings()
*/
public function testParseQuirkyRfcStringNotice($string, $occurrences)
{
$this->expectException(\PHPUnit\Framework\Error\Notice::class);

$object = new RSet($string);
try {
$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());
}
}

/**
Expand Down

0 comments on commit 4274d19

Please sign in to comment.