13
13
14
14
use ApiPlatform \Core \Bridge \Doctrine \Orm \CollectionDataProvider ;
15
15
use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \QueryCollectionExtensionInterface ;
16
- use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \QueryResultExtensionInterface ;
16
+ use ApiPlatform \Core \Bridge \Doctrine \Orm \Extension \QueryResultCollectionExtensionInterface ;
17
17
use ApiPlatform \Core \Bridge \Doctrine \Orm \Util \QueryNameGeneratorInterface ;
18
18
use ApiPlatform \Core \Tests \Fixtures \TestBundle \Entity \Dummy ;
19
19
use Doctrine \Common \Persistence \ManagerRegistry ;
@@ -47,10 +47,10 @@ public function testGetCollection()
47
47
$ managerRegistryProphecy = $ this ->prophesize (ManagerRegistry::class);
48
48
$ managerRegistryProphecy ->getManagerForClass (Dummy::class)->willReturn ($ managerProphecy ->reveal ())->shouldBeCalled ();
49
49
50
- $ exstensionProphecy = $ this ->prophesize (QueryCollectionExtensionInterface::class);
51
- $ exstensionProphecy ->applyToCollection ($ queryBuilder , Argument::type (QueryNameGeneratorInterface::class), Dummy::class, 'foo ' )->shouldBeCalled ();
50
+ $ extensionProphecy = $ this ->prophesize (QueryCollectionExtensionInterface::class);
51
+ $ extensionProphecy ->applyToCollection ($ queryBuilder , Argument::type (QueryNameGeneratorInterface::class), Dummy::class, 'foo ' )->shouldBeCalled ();
52
52
53
- $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ exstensionProphecy ->reveal ()]);
53
+ $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ extensionProphecy ->reveal ()]);
54
54
$ this ->assertEquals ([], $ dataProvider ->getCollection (Dummy::class, 'foo ' ));
55
55
}
56
56
@@ -68,12 +68,12 @@ public function testQueryResultExtension()
68
68
$ managerRegistryProphecy = $ this ->prophesize (ManagerRegistry::class);
69
69
$ managerRegistryProphecy ->getManagerForClass (Dummy::class)->willReturn ($ managerProphecy ->reveal ())->shouldBeCalled ();
70
70
71
- $ exstensionProphecy = $ this ->prophesize (QueryResultExtensionInterface ::class);
72
- $ exstensionProphecy ->applyToCollection ($ queryBuilder , Argument::type (QueryNameGeneratorInterface::class), Dummy::class, 'foo ' )->shouldBeCalled ();
73
- $ exstensionProphecy ->supportsResult (Dummy::class, 'foo ' )->willReturn (true )->shouldBeCalled ();
74
- $ exstensionProphecy ->getResult ($ queryBuilder )->willReturn ([])->shouldBeCalled ();
71
+ $ extensionProphecy = $ this ->prophesize (QueryResultCollectionExtensionInterface ::class);
72
+ $ extensionProphecy ->applyToCollection ($ queryBuilder , Argument::type (QueryNameGeneratorInterface::class), Dummy::class, 'foo ' )->shouldBeCalled ();
73
+ $ extensionProphecy ->supportsResult (Dummy::class, 'foo ' )->willReturn (true )->shouldBeCalled ();
74
+ $ extensionProphecy ->getResult ($ queryBuilder )->willReturn ([])->shouldBeCalled ();
75
75
76
- $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ exstensionProphecy ->reveal ()]);
76
+ $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ extensionProphecy ->reveal ()]);
77
77
$ this ->assertEquals ([], $ dataProvider ->getCollection (Dummy::class, 'foo ' ));
78
78
}
79
79
@@ -103,9 +103,9 @@ public function testThrowResourceClassNotSupportedException()
103
103
$ managerRegistryProphecy = $ this ->prophesize (ManagerRegistry::class);
104
104
$ managerRegistryProphecy ->getManagerForClass (Dummy::class)->willReturn (null )->shouldBeCalled ();
105
105
106
- $ extenstensionProphecy = $ this ->prophesize (QueryResultExtensionInterface ::class);
106
+ $ extensionProphecy = $ this ->prophesize (QueryResultCollectionExtensionInterface ::class);
107
107
108
- $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ extenstensionProphecy ->reveal ()]);
108
+ $ dataProvider = new CollectionDataProvider ($ managerRegistryProphecy ->reveal (), [$ extensionProphecy ->reveal ()]);
109
109
$ dataProvider ->getCollection (Dummy::class, 'foo ' );
110
110
}
111
111
}
0 commit comments