diff --git a/tests/Mocks/Connection.php b/tests/Mocks/Connection.php index e004d9a..992f29e 100644 --- a/tests/Mocks/Connection.php +++ b/tests/Mocks/Connection.php @@ -13,6 +13,8 @@ class Connection implements ConnectionInterface public $sentData = []; + public $closed = false; + function send($data) { $this->sentData[] = json_decode($data, true); @@ -20,7 +22,7 @@ class Connection implements ConnectionInterface function close() { - // TODO: Implement close() method. + $this->closed = true; } public function assertSentEvent(string $name, array $additionalParameters = []) @@ -35,4 +37,9 @@ class Connection implements ConnectionInterface PHPUnit::assertSame($event[$parameter], $value); } } + + public function assertClosed() + { + PHPUnit::assertTrue($this->closed); + } } \ No newline at end of file