From 7953ce51ee1a9b2506b6d344207d8ac3d58d6e0a Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Tue, 12 Mar 2024 18:20:56 +0100 Subject: [PATCH] Update makefile, tweak topictest --- Makefile | 10 +++++++++- tests/Broker/TopicTest.php | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 90eccf2..c491a1b 100755 --- a/Makefile +++ b/Makefile @@ -20,4 +20,12 @@ phar: ## Build .phar using pharlite .PHONY: phpstan phpstan: ## Run static analysis - phpstan --no-progress + @phpstan --no-progress + +.PHONY: phpunit +phpunit: ## Run unit tests + @phpunit --testdox --no-progress + +.PHONY: coverage +coverage: ## Code coverage + @XDEBUG_MODE=coverage phpunit --coverage-text --no-progress diff --git a/tests/Broker/TopicTest.php b/tests/Broker/TopicTest.php index 39c6a6e..b8e98ec 100644 --- a/tests/Broker/TopicTest.php +++ b/tests/Broker/TopicTest.php @@ -5,6 +5,7 @@ namespace NoccyLabs\Mercureact\Broker; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(Topic::class)] +#[CoversClass(Message::class)] class TopicTest extends \PHPUnit\Framework\TestCase { @@ -64,4 +65,4 @@ class TopicTest extends \PHPUnit\Framework\TestCase $this->assertEquals(0, count($unauthorizedSubscriber->messages)); } -} \ No newline at end of file +}