| 1 | <?php |
||
| 11 | use Symplify\NetteAdapterForSymfonyBundles\DI\NetteAdapterForSymfonyBundlesExtension; |
||
| 12 | use Symplify\NetteAdapterForSymfonyBundles\Tests\ContainerFactory; |
||
| 13 | |||
| 14 | final class NetteAdapterForSymfonyBundlesTest extends TestCase |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var NetteAdapterForSymfonyBundlesExtension |
||
| 18 | */ |
||
| 19 | private $extension; |
||
| 20 | |||
| 21 | protected function setUp() |
||
| 38 | |||
| 39 | public function testLoadBundlesEmpty() |
||
| 40 | { |
||
| 41 | $bundles = (new Loader())->load(__DIR__ . '/NetteAdapterForSymfonyBundlesSource/bundles.neon'); |
||
| 42 | $this->extension->setConfig($bundles); |
||
|
|
|||
| 43 | $this->extension->loadConfiguration(); |
||
| 44 | $this->extension->beforeCompile(); |
||
| 45 | |||
| 46 | $builder = $this->extension->getContainerBuilder(); |
||
| 47 | $this->assertGreaterThan(17, $builder->getDefinitions()); |
||
| 50 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.