New behavior for `tests\mocks\core\MockCallable` #726

Merged
merged 1 commit into from Dec 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

jails commented Dec 11, 2012

Example of use case:

<?php
$callable = new MockCallable();
Adaptable::config(array(
    'test_config' => array(
        'object' => $callable
    )
));
Adaptable::method(array(...));
var_dump($callable->call);
//or
var_dump($callable::staticCall);

@nateabele nateabele commented on an outdated diff Dec 11, 2012

tests/cases/core/ObjectTest.php
*/
public function testMethodInvocationWithParameters() {
$callable = new MockCallable();
- $this->assertEqual($callable->invokeMethod('foo'), array());
- $this->assertEqual($callable->invokeMethod('foo', array('bar')), array('bar'));
+ extract($callable->invokeMethod('foo'));
@nateabele

nateabele Dec 11, 2012

Owner

Not a big fan of extract(). It makes code harder to read.

Contributor

jails commented Dec 11, 2012

w/o the extract, squashed.

@nateabele nateabele added a commit that referenced this pull request Dec 11, 2012

@nateabele nateabele Merge pull request #726 from jails/dev
New behavior for `tests\mocks\core\MockCallable`
ee1b329

@nateabele nateabele merged commit ee1b329 into UnionOfRAD:dev Dec 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment