Skip to content

Commit c4616eb

Browse files
committed
minor #16414 removed all @Covers annotations (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- removed all @Covers annotations | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Some unit tests have a `@covers` PHPUnit annotations. Most of them were added a very long time ago, but since then, we did not use them anymore and the existing ones are not maintained (see #16413). So, I propose to remove them all. Commits ------- 1e0af36 removed all @Covers annotations
2 parents 818dc4f + 355e517 commit c4616eb

14 files changed

+0
-280
lines changed

Tests/ContainerBuilderTest.php

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929

3030
class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
3131
{
32-
/**
33-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setDefinitions
34-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getDefinitions
35-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setDefinition
36-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getDefinition
37-
*/
3832
public function testDefinitions()
3933
{
4034
$builder = new ContainerBuilder();
@@ -62,9 +56,6 @@ public function testDefinitions()
6256
}
6357
}
6458

65-
/**
66-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::register
67-
*/
6859
public function testRegister()
6960
{
7061
$builder = new ContainerBuilder();
@@ -73,9 +64,6 @@ public function testRegister()
7364
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Definition', $builder->getDefinition('foo'), '->register() returns the newly created Definition instance');
7465
}
7566

76-
/**
77-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::has
78-
*/
7967
public function testHas()
8068
{
8169
$builder = new ContainerBuilder();
@@ -86,9 +74,6 @@ public function testHas()
8674
$this->assertTrue($builder->has('bar'), '->has() returns true if a service exists');
8775
}
8876

89-
/**
90-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::get
91-
*/
9277
public function testGet()
9378
{
9479
$builder = new ContainerBuilder();
@@ -121,7 +106,6 @@ public function testGet()
121106
}
122107

123108
/**
124-
* @covers \Symfony\Component\DependencyInjection\ContainerBuilder::get
125109
* @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
126110
* @expectedExceptionMessage You have requested a synthetic service ("foo"). The DIC does not know how to construct this service.
127111
*/
@@ -140,9 +124,6 @@ public function testGetUnsetLoadingServiceWhenCreateServiceThrowsAnException()
140124
$builder->get('foo');
141125
}
142126

143-
/**
144-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::get
145-
*/
146127
public function testGetReturnsNullOnInactiveScope()
147128
{
148129
$builder = new ContainerBuilder();
@@ -151,19 +132,13 @@ public function testGetReturnsNullOnInactiveScope()
151132
$this->assertNull($builder->get('foo', ContainerInterface::NULL_ON_INVALID_REFERENCE));
152133
}
153134

154-
/**
155-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::get
156-
*/
157135
public function testGetReturnsNullOnInactiveScopeWhenServiceIsCreatedByAMethod()
158136
{
159137
$builder = new ProjectContainer();
160138

161139
$this->assertNull($builder->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE));
162140
}
163141

164-
/**
165-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getServiceIds
166-
*/
167142
public function testGetServiceIds()
168143
{
169144
$builder = new ContainerBuilder();
@@ -173,11 +148,6 @@ public function testGetServiceIds()
173148
$this->assertEquals(array('foo', 'bar', 'service_container'), $builder->getServiceIds(), '->getServiceIds() returns all defined service ids');
174149
}
175150

176-
/**
177-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setAlias
178-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::hasAlias
179-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getAlias
180-
*/
181151
public function testAliases()
182152
{
183153
$builder = new ContainerBuilder();
@@ -204,9 +174,6 @@ public function testAliases()
204174
}
205175
}
206176

207-
/**
208-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getAliases
209-
*/
210177
public function testGetAliases()
211178
{
212179
$builder = new ContainerBuilder();
@@ -229,9 +196,6 @@ public function testGetAliases()
229196
$this->assertCount(0, $builder->getAliases(), '->getAliases() does not return aliased services that have been overridden');
230197
}
231198

232-
/**
233-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setAliases
234-
*/
235199
public function testSetAliases()
236200
{
237201
$builder = new ContainerBuilder();
@@ -242,9 +206,6 @@ public function testSetAliases()
242206
$this->assertTrue(isset($aliases['foobar']));
243207
}
244208

245-
/**
246-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addAliases
247-
*/
248209
public function testAddAliases()
249210
{
250211
$builder = new ContainerBuilder();
@@ -256,10 +217,6 @@ public function testAddAliases()
256217
$this->assertTrue(isset($aliases['foobar']));
257218
}
258219

259-
/**
260-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass
261-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getCompilerPassConfig
262-
*/
263220
public function testAddGetCompilerPass()
264221
{
265222
$builder = new ContainerBuilder();
@@ -270,9 +227,6 @@ public function testAddGetCompilerPass()
270227
$this->assertCount(count($builder->getCompiler()->getPassConfig()->getPasses()) - 1, $builderCompilerPasses);
271228
}
272229

273-
/**
274-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
275-
*/
276230
public function testCreateService()
277231
{
278232
$builder = new ContainerBuilder();
@@ -283,9 +237,6 @@ public function testCreateService()
283237
$this->assertInstanceOf('\FooClass', $builder->get('foo2'), '->createService() replaces parameters in the file provided by the service definition');
284238
}
285239

286-
/**
287-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
288-
*/
289240
public function testCreateProxyWithRealServiceInstantiator()
290241
{
291242
$builder = new ContainerBuilder();
@@ -299,9 +250,6 @@ public function testCreateProxyWithRealServiceInstantiator()
299250
$this->assertSame('FooClass', get_class($foo1));
300251
}
301252

302-
/**
303-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
304-
*/
305253
public function testCreateServiceClass()
306254
{
307255
$builder = new ContainerBuilder();
@@ -310,9 +258,6 @@ public function testCreateServiceClass()
310258
$this->assertInstanceOf('\stdClass', $builder->get('foo1'), '->createService() replaces parameters in the class provided by the service definition');
311259
}
312260

313-
/**
314-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
315-
*/
316261
public function testCreateServiceArguments()
317262
{
318263
$builder = new ContainerBuilder();
@@ -322,9 +267,6 @@ public function testCreateServiceArguments()
322267
$this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar'), '%unescape_it%'), $builder->get('foo1')->arguments, '->createService() replaces parameters and service references in the arguments provided by the service definition');
323268
}
324269

325-
/**
326-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
327-
*/
328270
public function testCreateServiceFactoryMethod()
329271
{
330272
$builder = new ContainerBuilder();
@@ -341,9 +283,6 @@ public function testCreateServiceFactoryMethod()
341283
$this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar')), $builder->get('foo1')->arguments, '->createService() passes the arguments to the factory method');
342284
}
343285

344-
/**
345-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
346-
*/
347286
public function testCreateServiceFactoryService()
348287
{
349288
$builder = new ContainerBuilder();
@@ -357,9 +296,6 @@ public function testCreateServiceFactoryService()
357296
$this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance');
358297
}
359298

360-
/**
361-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
362-
*/
363299
public function testCreateServiceMethodCalls()
364300
{
365301
$builder = new ContainerBuilder();
@@ -369,9 +305,6 @@ public function testCreateServiceMethodCalls()
369305
$this->assertEquals(array('bar', $builder->get('bar')), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments');
370306
}
371307

372-
/**
373-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
374-
*/
375308
public function testCreateServiceConfigurator()
376309
{
377310
$builder = new ContainerBuilder();
@@ -396,7 +329,6 @@ public function testCreateServiceConfigurator()
396329
}
397330

398331
/**
399-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
400332
* @expectedException \RuntimeException
401333
*/
402334
public function testCreateSyntheticService()
@@ -406,9 +338,6 @@ public function testCreateSyntheticService()
406338
$builder->get('foo');
407339
}
408340

409-
/**
410-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::resolveServices
411-
*/
412341
public function testResolveServices()
413342
{
414343
$builder = new ContainerBuilder();
@@ -417,9 +346,6 @@ public function testResolveServices()
417346
$this->assertEquals(array('foo' => array('foo', $builder->get('foo'))), $builder->resolveServices(array('foo' => array('foo', new Reference('foo')))), '->resolveServices() resolves service references to service instances in nested arrays');
418347
}
419348

420-
/**
421-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
422-
*/
423349
public function testMerge()
424350
{
425351
$container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo')));
@@ -467,7 +393,6 @@ public function testMerge()
467393
}
468394

469395
/**
470-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
471396
* @expectedException \LogicException
472397
*/
473398
public function testMergeLogicException()
@@ -478,9 +403,6 @@ public function testMergeLogicException()
478403
$container->merge(new ContainerBuilder());
479404
}
480405

481-
/**
482-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::findTaggedServiceIds
483-
*/
484406
public function testfindTaggedServiceIds()
485407
{
486408
$builder = new ContainerBuilder();
@@ -499,9 +421,6 @@ public function testfindTaggedServiceIds()
499421
$this->assertEquals(array(), $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services');
500422
}
501423

502-
/**
503-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::findDefinition
504-
*/
505424
public function testFindDefinition()
506425
{
507426
$container = new ContainerBuilder();
@@ -511,9 +430,6 @@ public function testFindDefinition()
511430
$this->assertEquals($definition, $container->findDefinition('foobar'), '->findDefinition() returns a Definition');
512431
}
513432

514-
/**
515-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addObjectResource
516-
*/
517433
public function testAddObjectResource()
518434
{
519435
$container = new ContainerBuilder();
@@ -537,9 +453,6 @@ public function testAddObjectResource()
537453
$this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource()));
538454
}
539455

540-
/**
541-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addClassResource
542-
*/
543456
public function testAddClassResource()
544457
{
545458
$container = new ContainerBuilder();
@@ -563,9 +476,6 @@ public function testAddClassResource()
563476
$this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource()));
564477
}
565478

566-
/**
567-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::compile
568-
*/
569479
public function testCompilesClassDefinitionsOfLazyServices()
570480
{
571481
$container = new ContainerBuilder();
@@ -588,10 +498,6 @@ function (ResourceInterface $resource) use ($classesPath) {
588498
$this->assertNotEmpty($matchingResources);
589499
}
590500

591-
/**
592-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getResources
593-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addResource
594-
*/
595501
public function testResources()
596502
{
597503
$container = new ContainerBuilder();
@@ -608,10 +514,6 @@ public function testResources()
608514
$this->assertEquals(array(), $container->getResources());
609515
}
610516

611-
/**
612-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::registerExtension
613-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtension
614-
*/
615517
public function testExtension()
616518
{
617519
$container = new ContainerBuilder();
@@ -757,10 +659,6 @@ public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer()
757659
$container->setDefinition('a', new Definition());
758660
}
759661

760-
/**
761-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtensionConfig
762-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::prependExtensionConfig
763-
*/
764662
public function testExtensionConfig()
765663
{
766664
$container = new ContainerBuilder();

0 commit comments

Comments
 (0)