diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-27 14:07:08 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-09-27 14:09:55 +0200 |
commit | b1baca99f280570d0336b4d71ad1f9dca213a35b (patch) | |
tree | 518de2057da549d0baa982c6aa689aa813377774 /tests/HistoryTest.php | |
parent | 8f60e1206e45e67c96a7630d4ff94e72fe875f09 (diff) | |
download | Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.gz Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.zst Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.zip |
Convert legacy PHPUnit @expected* to new ->expect*
Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
Diffstat (limited to 'tests/HistoryTest.php')
-rw-r--r-- | tests/HistoryTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/HistoryTest.php b/tests/HistoryTest.php index e9e61032..fb633e79 100644 --- a/tests/HistoryTest.php +++ b/tests/HistoryTest.php | |||
@@ -44,12 +44,12 @@ class HistoryTest extends \PHPUnit\Framework\TestCase | |||
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Not writable history file: raise an exception. | 46 | * Not writable history file: raise an exception. |
47 | * | ||
48 | * @expectedException Exception | ||
49 | * @expectedExceptionMessage History file isn't readable or writable | ||
50 | */ | 47 | */ |
51 | public function testConstructNotWritable() | 48 | public function testConstructNotWritable() |
52 | { | 49 | { |
50 | $this->expectException(\Exception::class); | ||
51 | $this->expectExceptionMessage('History file isn\'t readable or writable'); | ||
52 | |||
53 | touch(self::$historyFilePath); | 53 | touch(self::$historyFilePath); |
54 | chmod(self::$historyFilePath, 0440); | 54 | chmod(self::$historyFilePath, 0440); |
55 | $history = new History(self::$historyFilePath); | 55 | $history = new History(self::$historyFilePath); |
@@ -58,12 +58,12 @@ class HistoryTest extends \PHPUnit\Framework\TestCase | |||
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Not parsable history file: raise an exception. | 60 | * Not parsable history file: raise an exception. |
61 | * | ||
62 | * @expectedException Exception | ||
63 | * @expectedExceptionMessageRegExp /Could not parse history file/ | ||
64 | */ | 61 | */ |
65 | public function testConstructNotParsable() | 62 | public function testConstructNotParsable() |
66 | { | 63 | { |
64 | $this->expectException(\Exception::class); | ||
65 | $this->expectExceptionMessageRegExp('/Could not parse history file/'); | ||
66 | |||
67 | file_put_contents(self::$historyFilePath, 'not parsable'); | 67 | file_put_contents(self::$historyFilePath, 'not parsable'); |
68 | $history = new History(self::$historyFilePath); | 68 | $history = new History(self::$historyFilePath); |
69 | // gzinflate generates a warning | 69 | // gzinflate generates a warning |