|
@@ 39-46 (lines=8) @@
|
| 36 |
|
$this->resolve($data)->shouldBeAnInstanceOf(ConstructorObject::class); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
function it_can_call_methods_with_arguments_on_resolved_objects(ContainerInterface $container, SimpleObject $object) |
| 40 |
|
{ |
| 41 |
|
$container->get('first-object')->willReturn($object); |
| 42 |
|
$this->setContainer($container); |
| 43 |
|
$data = new DefinitionData(ConstructorObject::class, ['@first-object']); |
| 44 |
|
$data->addCall(DefinitionData::METHOD, 'setOther', ['@first-object']); |
| 45 |
|
$this->resolve($data)->shouldHavePropertyEquals('other', $object); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
function it_can_assign_property_values_on_resolved_objects(ContainerInterface $container, SimpleObject $object) |
| 49 |
|
{ |
|
@@ 48-55 (lines=8) @@
|
| 45 |
|
$this->resolve($data)->shouldHavePropertyEquals('other', $object); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
function it_can_assign_property_values_on_resolved_objects(ContainerInterface $container, SimpleObject $object) |
| 49 |
|
{ |
| 50 |
|
$container->get('first-object')->willReturn($object); |
| 51 |
|
$this->setContainer($container); |
| 52 |
|
$data = new DefinitionData(ConstructorObject::class, ['@first-object']); |
| 53 |
|
$data->addCall(DefinitionData::PROPERTY, 'other', '@first-object'); |
| 54 |
|
$this->resolve($data)->shouldHavePropertyEquals('other', $object); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
|
function it_creates_object_from_classes_without_constructor() |
| 58 |
|
{ |