diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3e0a6..43238af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +#### 0.5.1 + +* Fixed strict errors for func verifier *2014-10-16* + + #### 0.5.0 * test::ns() method removed *2014-10-10* diff --git a/RoboFile.php b/RoboFile.php index c6b0ec2..0fa423a 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -33,6 +33,8 @@ public function release() ->uri('Codeception/AspectMock') ->askDescription() ->run(); + + $this->bump(); } public function docs() diff --git a/VERSION b/VERSION index 79a2734..5d4294b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.0 \ No newline at end of file +0.5.1 \ No newline at end of file diff --git a/src/AspectMock/Proxy/FuncProxy.php b/src/AspectMock/Proxy/FuncProxy.php index 8f6c8ed..4215833 100644 --- a/src/AspectMock/Proxy/FuncProxy.php +++ b/src/AspectMock/Proxy/FuncProxy.php @@ -23,22 +23,23 @@ * ``` * */ -class FuncProxy extends Verifier +class FuncProxy { protected $func; protected $ns; protected $fullFuncName; + /** + * @var FuncVerifier + */ + protected $funcVerifier; + public function __construct($namespace, $func) { $this->func = $func; $this->ns = $namespace; $this->fullFuncName = $namespace . '/' . $func; - } - - protected function callSyntax($method) - { - return ""; + $this->funcVerifier = new FuncVerifier($namespace); } /** @@ -46,7 +47,7 @@ protected function callSyntax($method) */ public function verifyInvoked($params = null) { - parent::verifyInvoked($this->func, $params); + $this->funcVerifier->verifyInvoked($this->func, $params); } /** @@ -54,7 +55,7 @@ public function verifyInvoked($params = null) */ public function verifyInvokedOnce($params = null) { - $this->verifyInvokedMultipleTimes(1, $params); + $this->funcVerifier->verifyInvokedMultipleTimes($this->func, 1, $params); } /** @@ -62,7 +63,7 @@ public function verifyInvokedOnce($params = null) */ public function verifyNeverInvoked($params = null) { - parent::verifyNeverInvoked($this->func, $params); + $this->funcVerifier->verifyNeverInvoked($this->func, $params); } /** @@ -71,7 +72,7 @@ public function verifyNeverInvoked($params = null) */ public function verifyInvokedMultipleTimes($times, $params = null) { - parent::verifyInvokedMultipleTimes($this->func, $times, $params); + $this->funcVerifier->verifyInvokedMultipleTimes($this->func, $times, $params); } /** diff --git a/src/AspectMock/Proxy/FuncVerifier.php b/src/AspectMock/Proxy/FuncVerifier.php new file mode 100644 index 0000000..7535375 --- /dev/null +++ b/src/AspectMock/Proxy/FuncVerifier.php @@ -0,0 +1,27 @@ +ns = $namespace; + } + + protected function callSyntax($method) + { + return ""; + } + + public function getCallsForMethod($func) + { + $calls = Registry::getFuncCallsFor($this->ns . '\\' . $func); + return $calls; + } + + +} \ No newline at end of file