|
@@ 97-108 (lines=12) @@
|
| 94 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
public function testFactoryBuiltClassHaveMissingArgumentsTypehints() |
| 98 |
|
{ |
| 99 |
|
$definition = new Definition(MissingArgumentsTypehints::class); |
| 100 |
|
$definition->setFactory([ |
| 101 |
|
MissingArgumentsTypehintsFactory::class, |
| 102 |
|
'create', |
| 103 |
|
]); |
| 104 |
|
|
| 105 |
|
$definition->setArguments(['@someService']); |
| 106 |
|
|
| 107 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public function testServiceFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 111 |
|
{ |
|
@@ 128-139 (lines=12) @@
|
| 125 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 126 |
|
} |
| 127 |
|
|
| 128 |
|
public function testFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 129 |
|
{ |
| 130 |
|
$definition = new Definition(NotMissingArgumentsTypehints::class); |
| 131 |
|
$definition->setFactory([ |
| 132 |
|
NotMissingArgumentsTypehintsFactory::class, |
| 133 |
|
'create', |
| 134 |
|
]); |
| 135 |
|
|
| 136 |
|
$definition->setArguments(['@someService']); |
| 137 |
|
|
| 138 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 139 |
|
} |
| 140 |
|
} |
| 141 |
|
|