|
@@ 84-95 (lines=12) @@
|
| 81 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 82 |
|
} |
| 83 |
|
|
| 84 |
|
public function testFactoryBuiltClassHaveMissingArgumentsTypehints() |
| 85 |
|
{ |
| 86 |
|
$definition = new Definition(MissingArgumentsTypehints::class); |
| 87 |
|
$definition->setFactory([ |
| 88 |
|
MissingArgumentsTypehintsFactory::class, |
| 89 |
|
'create', |
| 90 |
|
]); |
| 91 |
|
|
| 92 |
|
$definition->setArguments(['@someService']); |
| 93 |
|
|
| 94 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
public function testServiceFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 98 |
|
{ |
|
@@ 115-126 (lines=12) @@
|
| 112 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
public function testFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 116 |
|
{ |
| 117 |
|
$definition = new Definition(NotMissingArgumentsTypehints::class); |
| 118 |
|
$definition->setFactory([ |
| 119 |
|
NotMissingArgumentsTypehintsFactory::class, |
| 120 |
|
'create', |
| 121 |
|
]); |
| 122 |
|
|
| 123 |
|
$definition->setArguments(['@someService']); |
| 124 |
|
|
| 125 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 126 |
|
} |
| 127 |
|
|
| 128 |
|
public function testFactoryServiceIsUsedByAlias() |
| 129 |
|
{ |