diff --git a/README.md b/README.md index 5dfc949..d829824 100644 --- a/README.md +++ b/README.md @@ -21,18 +21,17 @@ The recommended installation method for this library is to add it as dependency ```json { "require": { - "onoi/message-reporter": "~1.1" + "onoi/message-reporter": "~1.2" } } ``` ## Usage -The message reporter specifies `MessageReporter` as an interface for all interactions with a set of supporting classes: +The message reporter specifies `MessageReporter` and `MessageReporterAware` as an interface for all interactions with a set of supporting classes: - `MessageReporterFactory` - `ObservableMessageReporter` - `NullMessageReporter` -- `MessageReporterAware` - `SpyMessageReporter` ```php diff --git a/tests/phpunit/MessageReporterFactoryTest.php b/tests/phpunit/MessageReporterFactoryTest.php index 42b3554..291b536 100644 --- a/tests/phpunit/MessageReporterFactoryTest.php +++ b/tests/phpunit/MessageReporterFactoryTest.php @@ -6,7 +6,6 @@ /** * @covers \Onoi\MessageReporter\MessageReporterFactory - * * @group onoi-message-reporter * * @license GNU GPL v2+ @@ -46,9 +45,9 @@ public function testClear() { ); } - public function testNewNullMessageReporter() { + public function testCanConstructNullMessageReporter() { - $instance = new MessageReporterFactory(); + $instance = new MessageReporterFactory(); $this->assertInstanceOf( '\Onoi\MessageReporter\NullMessageReporter', @@ -56,9 +55,9 @@ public function testNewNullMessageReporter() { ); } - public function testNewObservableMessageReporter() { + public function testCanConstructObservableMessageReporter() { - $instance = new MessageReporterFactory(); + $instance = new MessageReporterFactory(); $this->assertInstanceOf( '\Onoi\MessageReporter\ObservableMessageReporter', @@ -66,4 +65,14 @@ public function testNewObservableMessageReporter() { ); } + public function testCanConstructSpyMessageReporter() { + + $instance = new MessageReporterFactory(); + + $this->assertInstanceOf( + '\Onoi\MessageReporter\SpyMessageReporter', + $instance->newSpyMessageReporter() + ); + } + }