Skip to content

Commit fe1d458

Browse files
committed
PHP 5.5 ::class shortcuts
1 parent f53bf0a commit fe1d458

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/FunctionalTest/KernelTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function kernel_should_boot()
2525
{
2626
$kernel = $this->createKernel();
2727

28-
$this->assertTrue($kernel->getContainer() instanceof SymfonyContainerBridge);
28+
$this->assertInstanceOf(SymfonyContainerBridge::class, $kernel->getContainer());
2929
}
3030

3131
/**
@@ -36,7 +36,7 @@ public function phpdi_should_resolve_classes()
3636
$kernel = $this->createKernel();
3737

3838
$object = $kernel->getContainer()->get(Class1::class);
39-
$this->assertTrue($object instanceof Class1);
39+
$this->assertInstanceOf(Class1::class, $object);
4040
}
4141

4242
/**
@@ -47,6 +47,6 @@ public function symfony_should_resolve_classes()
4747
$kernel = $this->createKernel('class2.yml');
4848

4949
$object = $kernel->getContainer()->get('class2');
50-
$this->assertTrue($object instanceof Class2);
50+
$this->assertInstanceOf(Class2::class, $object);
5151
}
5252
}

tests/UnitTest/SymfonyContainerBridgeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function testHasFallback()
1919
{
2020
$wrapper = new SymfonyContainerBridge();
2121

22-
$fallback = $this->getMockForAbstractClass('Interop\Container\ContainerInterface');
22+
$fallback = $this->getMockForAbstractClass(ContainerInterface::class);
2323
$fallback->expects($this->once())
2424
->method('has')
2525
->with('foo')
@@ -34,7 +34,7 @@ public function testGetFallback()
3434
{
3535
$wrapper = new SymfonyContainerBridge();
3636

37-
$fallback = $this->getMockForAbstractClass('Interop\Container\ContainerInterface');
37+
$fallback = $this->getMockForAbstractClass(ContainerInterface::class);
3838
$fallback->expects($this->once())
3939
->method('get')
4040
->with('foo')

0 commit comments

Comments
 (0)