Skip to content

Commit 66267b2

Browse files
committed
Merge branch '2.3' into 2.7
* 2.3: removed all @Covers annotations [PropertyAccess] Major performance improvement
2 parents 98342b7 + c4616eb commit 66267b2

14 files changed

+0
-278
lines changed

Tests/ContainerBuilderTest.php

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

3131
class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
3232
{
33-
/**
34-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setDefinitions
35-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getDefinitions
36-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setDefinition
37-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getDefinition
38-
*/
3933
public function testDefinitions()
4034
{
4135
$builder = new ContainerBuilder();
@@ -63,9 +57,6 @@ public function testDefinitions()
6357
}
6458
}
6559

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

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

90-
/**
91-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::get
92-
*/
9378
public function testGet()
9479
{
9580
$builder = new ContainerBuilder();
@@ -122,7 +107,6 @@ public function testGet()
122107
}
123108

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

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

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

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

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

177-
/**
178-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::setAlias
179-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::hasAlias
180-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getAlias
181-
*/
182152
public function testAliases()
183153
{
184154
$builder = new ContainerBuilder();
@@ -205,9 +175,6 @@ public function testAliases()
205175
}
206176
}
207177

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

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

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

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

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

287-
/**
288-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
289-
*/
290241
public function testCreateProxyWithRealServiceInstantiator()
291242
{
292243
$builder = new ContainerBuilder();
@@ -300,9 +251,6 @@ public function testCreateProxyWithRealServiceInstantiator()
300251
$this->assertSame('Bar\FooClass', get_class($foo1));
301252
}
302253

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

314-
/**
315-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
316-
*/
317262
public function testCreateServiceArguments()
318263
{
319264
$builder = new ContainerBuilder();
@@ -323,9 +268,6 @@ public function testCreateServiceArguments()
323268
$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');
324269
}
325270

326-
/**
327-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
328-
*/
329271
public function testCreateServiceFactory()
330272
{
331273
$builder = new ContainerBuilder();
@@ -356,9 +298,6 @@ public function testLegacyCreateServiceFactory()
356298
$this->assertEquals(array('foo' => 'bar', 'bar' => 'foo', $builder->get('bar')), $builder->get('foo1')->arguments, '->createService() passes the arguments to the factory method');
357299
}
358300

359-
/**
360-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
361-
*/
362301
public function testLegacyCreateServiceFactoryService()
363302
{
364303
$builder = new ContainerBuilder();
@@ -372,9 +311,6 @@ public function testLegacyCreateServiceFactoryService()
372311
$this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance');
373312
}
374313

375-
/**
376-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
377-
*/
378314
public function testCreateServiceMethodCalls()
379315
{
380316
$builder = new ContainerBuilder();
@@ -384,9 +320,6 @@ public function testCreateServiceMethodCalls()
384320
$this->assertEquals(array('bar', $builder->get('bar')), $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments');
385321
}
386322

387-
/**
388-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
389-
*/
390323
public function testCreateServiceConfigurator()
391324
{
392325
$builder = new ContainerBuilder();
@@ -414,7 +347,6 @@ public function testCreateServiceConfigurator()
414347
}
415348

416349
/**
417-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
418350
* @expectedException \RuntimeException
419351
*/
420352
public function testCreateSyntheticService()
@@ -433,9 +365,6 @@ public function testCreateServiceWithExpression()
433365
$this->assertEquals('foobar', $builder->get('foo')->arguments['foo']);
434366
}
435367

436-
/**
437-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::resolveServices
438-
*/
439368
public function testResolveServices()
440369
{
441370
$builder = new ContainerBuilder();
@@ -445,9 +374,6 @@ public function testResolveServices()
445374
$this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions');
446375
}
447376

448-
/**
449-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
450-
*/
451377
public function testMerge()
452378
{
453379
$container = new ContainerBuilder(new ParameterBag(array('bar' => 'foo')));
@@ -493,7 +419,6 @@ public function testMerge()
493419
}
494420

495421
/**
496-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
497422
* @expectedException \LogicException
498423
*/
499424
public function testMergeLogicException()
@@ -504,9 +429,6 @@ public function testMergeLogicException()
504429
$container->merge(new ContainerBuilder());
505430
}
506431

507-
/**
508-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::findTaggedServiceIds
509-
*/
510432
public function testfindTaggedServiceIds()
511433
{
512434
$builder = new ContainerBuilder();
@@ -525,9 +447,6 @@ public function testfindTaggedServiceIds()
525447
$this->assertEquals(array(), $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services');
526448
}
527449

528-
/**
529-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::findDefinition
530-
*/
531450
public function testFindDefinition()
532451
{
533452
$container = new ContainerBuilder();
@@ -537,9 +456,6 @@ public function testFindDefinition()
537456
$this->assertEquals($definition, $container->findDefinition('foobar'), '->findDefinition() returns a Definition');
538457
}
539458

540-
/**
541-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addObjectResource
542-
*/
543459
public function testAddObjectResource()
544460
{
545461
$container = new ContainerBuilder();
@@ -563,9 +479,6 @@ public function testAddObjectResource()
563479
$this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource()));
564480
}
565481

566-
/**
567-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addClassResource
568-
*/
569482
public function testAddClassResource()
570483
{
571484
$container = new ContainerBuilder();
@@ -589,9 +502,6 @@ public function testAddClassResource()
589502
$this->assertSame(realpath(__DIR__.'/Fixtures/includes/classes.php'), realpath($resource->getResource()));
590503
}
591504

592-
/**
593-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::compile
594-
*/
595505
public function testCompilesClassDefinitionsOfLazyServices()
596506
{
597507
$container = new ContainerBuilder();
@@ -614,10 +524,6 @@ function (ResourceInterface $resource) use ($classesPath) {
614524
$this->assertNotEmpty($matchingResources);
615525
}
616526

617-
/**
618-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getResources
619-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::addResource
620-
*/
621527
public function testResources()
622528
{
623529
$container = new ContainerBuilder();
@@ -634,10 +540,6 @@ public function testResources()
634540
$this->assertEquals(array(), $container->getResources());
635541
}
636542

637-
/**
638-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::registerExtension
639-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtension
640-
*/
641543
public function testExtension()
642544
{
643545
$container = new ContainerBuilder();
@@ -789,10 +691,6 @@ public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer()
789691
$container->setDefinition('a', new Definition());
790692
}
791693

792-
/**
793-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtensionConfig
794-
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::prependExtensionConfig
795-
*/
796694
public function testExtensionConfig()
797695
{
798696
$container = new ContainerBuilder();

0 commit comments

Comments
 (0)