Skip to content

Commit

Permalink
Merge pull request #731 from jails/dev
Browse files Browse the repository at this point in the history
`tests/mocks/core/MockCallable` now save passed parameters to `__construct()`
  • Loading branch information
nateabele committed Dec 12, 2012
2 parents 042898f + 2dc6c8a commit 6bc6a7b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/mocks/core/MockCallable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@

class MockCallable extends \lithium\core\Object {

public $construct = array();

public $call = array();

public $get = '';

public static $staticCall = array();
public static $callStatic = array();

public function __construct() {}
public function __construct() {
$this->construct = func_get_args();
}

public function __call($method, $params = array()) {
return $this->call = compact('method', 'params');
}

public static function __callStatic($method, $params) {
return static::$staticCall = compact('method', 'params');
return static::$callStatic = compact('method', 'params');
}

public function __get($value) {
Expand Down

0 comments on commit 6bc6a7b

Please sign in to comment.