28 'class' =>
'ObjectFactoryTestFixture',
36 'setter' => [
function () {
40 'closure_expansion' =>
false,
42 $this->assertInstanceOf(
'Closure', $obj->args[0] );
43 $this->assertSame(
'wrapped', $obj->args[0]() );
44 $this->assertSame(
'unwrapped', $obj->args[1] );
45 $this->assertInstanceOf(
'Closure', $obj->setterArgs[0] );
46 $this->assertSame(
'wrapped', $obj->setterArgs[0]() );
55 'class' =>
'ObjectFactoryTestFixture',
63 'setter' => [
function () {
67 'closure_expansion' =>
true,
69 $this->assertInternalType(
'string', $obj->args[0] );
70 $this->assertSame(
'wrapped', $obj->args[0] );
71 $this->assertSame(
'unwrapped', $obj->args[1] );
72 $this->assertInternalType(
'string', $obj->setterArgs[0] );
73 $this->assertSame(
'wrapped', $obj->setterArgs[0] );
76 'class' =>
'ObjectFactoryTestFixture',
77 'args' => [
function () {
81 'setter' => [
function () {
86 $this->assertInternalType(
'string', $obj->args[0] );
87 $this->assertSame(
'unwrapped', $obj->args[0] );
88 $this->assertInternalType(
'string', $obj->setterArgs[0] );
89 $this->assertSame(
'unwrapped', $obj->setterArgs[0] );
98 'factory' =>
function ( $a, $b ) {
103 $this->assertSame(
$args, $obj->args );
111 $args = [
'a',
'b' ];
124 'class' =>
'ObjectFactoryTestFixture',
127 $this->assertSame(
$args, $obj->args );
136 'ObjectFactoryTestFixture',
$args
138 $this->assertSame(
$args, $obj->args );
145 '1 args' => [ [ 1, ] ],
146 '2 args' => [ [ 1, 2, ] ],
147 '3 args' => [ [ 1, 2, 3, ] ],
148 '4 args' => [ [ 1, 2, 3, 4, ] ],
149 '5 args' => [ [ 1, 2, 3, 4, 5, ] ],
150 '6 args' => [ [ 1, 2, 3, 4, 5, 6, ] ],
151 '7 args' => [ [ 1, 2, 3, 4, 5, 6, 7, ] ],
152 '8 args' => [ [ 1, 2, 3, 4, 5, 6, 7, 8, ] ],
153 '9 args' => [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, ] ],
154 '10 args' => [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ] ],
155 '11 args' => [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ] ],
164 $args = [
'foo' => 1,
'bar' => 2,
'baz' => 3 ];
166 'ObjectFactoryTestFixture',
$args
175 $this->
args = func_get_args();
178 $this->setterArgs = func_get_args();