11
11
12
12
namespace FOS \UserBundle \Tests \Doctrine ;
13
13
14
+ use Doctrine \Persistence \Mapping \ClassMetadata ;
15
+ use Doctrine \Persistence \ObjectManager ;
16
+ use Doctrine \Persistence \ObjectRepository ;
14
17
use FOS \UserBundle \Doctrine \UserManager ;
15
18
use FOS \UserBundle \Model \User ;
16
19
use PHPUnit \Framework \TestCase ;
@@ -28,17 +31,17 @@ class UserManagerTest extends TestCase
28
31
29
32
public function setUp ()
30
33
{
31
- if (!interface_exists (' Doctrine\Common\Persistence\ ObjectManager' )) {
32
- $ this ->markTestSkipped ('Doctrine Common has to be installed for this test to run. ' );
34
+ if (!interface_exists (ObjectManager::class )) {
35
+ $ this ->markTestSkipped ('"doctrine/persistence" ^1.3 has to be installed for this test to run. ' );
33
36
}
34
37
35
38
$ passwordUpdater = $ this ->getMockBuilder ('FOS\UserBundle\Util\PasswordUpdaterInterface ' )->getMock ();
36
39
$ fieldsUpdater = $ this ->getMockBuilder ('FOS\UserBundle\Util\CanonicalFieldsUpdater ' )
37
40
->disableOriginalConstructor ()
38
41
->getMock ();
39
- $ class = $ this ->getMockBuilder (' Doctrine\Common\Persistence\Mapping\ ClassMetadata' )->getMock ();
40
- $ this ->om = $ this ->getMockBuilder (' Doctrine\Common\Persistence\ ObjectManager' )->getMock ();
41
- $ this ->repository = $ this ->getMockBuilder (' Doctrine\Common\Persistence\ ObjectRepository' )->getMock ();
42
+ $ class = $ this ->getMockBuilder (ClassMetadata::class )->getMock ();
43
+ $ this ->om = $ this ->getMockBuilder (ObjectManager::class )->getMock ();
44
+ $ this ->repository = $ this ->getMockBuilder (ObjectRepository::class )->getMock ();
42
45
43
46
$ this ->om ->expects ($ this ->any ())
44
47
->method ('getRepository ' )
0 commit comments