From 0939f4ae0ddf8a7450eb0493d00893bf355fd5c8 Mon Sep 17 00:00:00 2001 From: peter279k Date: Wed, 16 Jan 2019 14:12:44 +0800 Subject: [PATCH] Add expectedExceptionMessage annotation --- .travis.yml | 1 + tests/StringFormatterTest.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee4659a..d5be570 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - nightly matrix: diff --git a/tests/StringFormatterTest.php b/tests/StringFormatterTest.php index 55f7977..f6872e9 100644 --- a/tests/StringFormatterTest.php +++ b/tests/StringFormatterTest.php @@ -87,7 +87,8 @@ public function it_allows_empty_pattern() /** * @test - * @expectedException \Jsor\StringFormatter\Exception\InvalidFieldDescriptorCharacterException + * @expectedException \Jsor\StringFormatter\Exception\InvalidFieldDescriptorCharacterException + * @expectedExceptionMessage A field descriptor character must be a string consisting of single character, got null ("NULL"). */ public function it_throws_for_invalid_field_descriptor_character() { @@ -100,7 +101,8 @@ public function it_throws_for_invalid_field_descriptor_character() /** * @test - * @expectedException \Jsor\StringFormatter\Exception\InvalidFieldDescriptorCharacterException + * @expectedException \Jsor\StringFormatter\Exception\InvalidFieldDescriptorCharacterException + * @expectedExceptionMessage A field descriptor character must be a string consisting of single character, got "ab" ("string"). */ public function it_throws_for_too_long_field_descriptor_character() { @@ -113,7 +115,8 @@ public function it_throws_for_too_long_field_descriptor_character() /** * @test - * @expectedException \Jsor\StringFormatter\Exception\MissingFieldDescriptorException + * @expectedException \Jsor\StringFormatter\Exception\MissingFieldDescriptorException + * @expectedExceptionMessage Missing field description for character "a". */ public function it_throws_for_missing_field_descriptor_in_strict_mode() { @@ -124,7 +127,8 @@ public function it_throws_for_missing_field_descriptor_in_strict_mode() /** * @test - * @expectedException \Jsor\StringFormatter\Exception\MissingFieldValueException + * @expectedException \Jsor\StringFormatter\Exception\MissingFieldValueException + * @expectedExceptionMessage The value for the field "a" is missing. */ public function it_throws_for_missing_required_field_value() {