35 $this->assertEquals($expectedResult,
$option->getValue());
43 $closure =
function () {
44 return 'Value from closure';
47 $mock = $this->getMockBuilder(
'Foo')
48 ->setMethods([
'getValue'])
50 $mock->method(
'getValue')
51 ->with(
'arg1',
'arg2')
52 ->willReturn(
'Value from mock');
60 [$this,
'getTestValue'],
64 [__CLASS__,
'getTestValueStatically'],
69 'Value from mock', [
'arg1',
'arg2']
72 [TestCallback::class,
'getId'],
109 $this->assertAttributeEquals($expectedValue,
'_arguments',
$option);
139 $this->expectException(
'InvalidArgumentException');
140 $this->expectExceptionMessage($expectedMessage);
153 [
'Not_Existing_Callback_Class',
'someMethod'],
154 'Class "Not_Existing_Callback_Class" was not found',
157 [$this,
'notExistingMethod'],
158 'Callback does not callable' 161 [
'object' => $this,
'method' =>
'getTestValue'],
162 'Callback does not callable' 166 'Callback does not callable' 170 'Callback does not callable' 173 [$this,
'getTestValue'],
174 'Callable expected to be an array with class name as first element',
static getTestValueStatically()
testGetValueException($callback, $expectedMessage, $createInstance=false)
getValueExceptionDataProvider()
setArgumentsDataProvider()
testSetArguments($value, $expectedValue)
testGetValue($callback, $expectedResult, $arguments=null, $createInstance=false)