|
@@ 77-88 (lines=12) @@
|
| 74 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
public function testFactoryBuiltClassHaveMissingArgumentsTypehints() |
| 78 |
|
{ |
| 79 |
|
$definition = new Definition(MissingArgumentsTypehints::class); |
| 80 |
|
$definition->setFactory([ |
| 81 |
|
MissingArgumentsTypehintsFactory::class, |
| 82 |
|
'create', |
| 83 |
|
]); |
| 84 |
|
|
| 85 |
|
$definition->setArguments(['@someService']); |
| 86 |
|
|
| 87 |
|
$this->assertFalse($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
public function testServiceFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 91 |
|
{ |
|
@@ 108-119 (lines=12) @@
|
| 105 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired($containerBuilder, $definition)); |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
public function testFactoryBuiltClassHaveNotMissingArgumentsTypehints() |
| 109 |
|
{ |
| 110 |
|
$definition = new Definition(NotMissingArgumentsTypehints::class); |
| 111 |
|
$definition->setFactory([ |
| 112 |
|
NotMissingArgumentsTypehintsFactory::class, |
| 113 |
|
'create', |
| 114 |
|
]); |
| 115 |
|
|
| 116 |
|
$definition->setArguments(['@someService']); |
| 117 |
|
|
| 118 |
|
$this->assertTrue($this->definitionAnalyzer->shouldDefinitionBeAutowired(new ContainerBuilder(), $definition)); |
| 119 |
|
} |
| 120 |
|
} |
| 121 |
|
|