Skip to content

Commit 605c79c

Browse files
committed
[#1085] Replace usage of ClassName::class with strings for < PHP 5.5 compatibility
1 parent 32e01f8 commit 605c79c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Tests/Serializer/CallbackTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<?php
22

33
use \FOS\ElasticaBundle\Serializer\Callback;
4-
use \Symfony\Component\Serializer\Serializer;
54

65
class CallbackTest extends PHPUnit_Framework_TestCase
76
{
87
public function testSerializerMustHaveSerializeMethod()
98
{
109
$callback = new Callback();
11-
$this->setExpectedException(RuntimeException::class, 'The serializer must have a "serialize" method.');
10+
$this->setExpectedException('RuntimeException', 'The serializer must have a "serialize" method.');
1211
$callback->setSerializer(new \stdClass());
1312
}
1413

1514
public function testSetGroupsWorksWithValidSerializer()
1615
{
1716
$callback = new Callback();
18-
$serializer = $this->getMock(Serializer::class, [], [], '', false);
17+
$serializer = $this->getMock('Symfony\Component\Serializer\Serializer', [], [], '', false);
1918
$callback->setSerializer($serializer);
2019

2120
$callback->setGroups(array('foo'));
@@ -28,7 +27,7 @@ public function testSetGroupsFailsWithInvalidSerializer()
2827
$callback->setSerializer($serializer);
2928

3029
$this->setExpectedException(
31-
RuntimeException::class,
30+
'RuntimeException',
3231
'Setting serialization groups requires using "JMS\Serializer\Serializer" or '
3332
. '"Symfony\Component\Serializer\Serializer"'
3433
);

0 commit comments

Comments
 (0)