54 $obj = ObjectFactory::getObjectFromSpec( [
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] );
75 $obj = ObjectFactory::getObjectFromSpec( [
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] );
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, ] ],