From 758413be8b6f607b5d80d4f113da165f24ad452f Mon Sep 17 00:00:00 2001 From: Bernd Hoehl Date: Mon, 15 Oct 2018 16:09:08 +0200 Subject: [PATCH] missing assertions for method call invocations --- src/AspectMock/Proxy/Verifier.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/AspectMock/Proxy/Verifier.php b/src/AspectMock/Proxy/Verifier.php index a4b77b6..4ae2757 100644 --- a/src/AspectMock/Proxy/Verifier.php +++ b/src/AspectMock/Proxy/Verifier.php @@ -1,5 +1,7 @@ invokedMultipleTimesFail, $this->className.$separator.$name."($params)", $times, $equals)); } else if(is_callable($params)) { @@ -126,6 +131,7 @@ public function verifyInvokedMultipleTimes($name, $times, $params = null) } $num_calls = count($calls); if ($num_calls != $times) throw new fail(sprintf($this->invokedMultipleTimesFail, $this->className.$separator.$name, $times, $num_calls)); + Assert::assertTrue(true); } /** @@ -153,6 +159,7 @@ public function verifyNeverInvoked($name, $params = null) if (is_array($params)) { if (empty($calls)) { + Assert::assertTrue(true); return; } @@ -161,11 +168,13 @@ public function verifyNeverInvoked($name, $params = null) throw new fail(sprintf($this->neverInvoked, $this->className)); } } + Assert::assertTrue(true); return; } if (count($calls)) { throw new fail(sprintf($this->neverInvoked, $this->className.$separator.$name)); } + Assert::assertTrue(true); } }