File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
tests/integration/Collection Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1244,7 +1244,6 @@ public function unserialize($data): void
12441244 * Gets the default collectionsManager service
12451245 */
12461246 $ manager = $ container ->getShared ("collectionManager " );
1247-
12481247 if ($ manager === null ) {
12491248 throw new Exception (
12501249 "The injected service 'collectionManager' is not valid "
Original file line number Diff line number Diff line change 1919use Phalcon \Incubator \MongoDB \Mvc \Collection \Exception ;
2020use Phalcon \Incubator \MongoDB \Test \Fixtures \Mvc \Collections \Robots ;
2121use Phalcon \Incubator \MongoDB \Test \Fixtures \Traits \DiTrait ;
22+ use Traversable ;
2223
2324class AggregateCest
2425{
@@ -69,12 +70,13 @@ public function mvcCollectionAggregate(IntegrationTester $I)
6970 $ robots1 = Robots::aggregate ([
7071 [
7172 '$match ' => [
72- 'first_name ' => 'Wall '
73+ 'first_name ' => 'Wall ' ,
7374 ]
7475 ]
7576 ]);
7677
7778 $ I ->assertInstanceOf (Cursor::class, $ robots1 );
79+ $ I ->assertInstanceOf (Traversable::class, $ robots1 );
7880
7981 foreach ($ robots1 as $ rb ) {
8082 $ I ->assertIsArray ($ rb );
Original file line number Diff line number Diff line change 1818use Phalcon \Incubator \MongoDB \Mvc \Collection \Exception ;
1919use Phalcon \Incubator \MongoDB \Test \Fixtures \Mvc \Collections \Robots ;
2020use Phalcon \Incubator \MongoDB \Test \Fixtures \Traits \DiTrait ;
21+ use Traversable ;
2122
2223class FindCest
2324{
@@ -77,7 +78,9 @@ public function mvcCollectionFind(IntegrationTester $I)
7778 }
7879
7980 $ I ->assertNotEmpty ($ robots );
81+ $ I ->assertInstanceOf (Traversable::class, $ robots );
8082 $ I ->assertInstanceOf (Robots::class, $ result [0 ]);
83+ $ I ->assertInstanceOf (Traversable::class, $ robotsE );
8184 $ I ->assertCount (3 , $ result );
8285 $ I ->assertCount (2 , $ robotsE ->toArray ());
8386 }
You can’t perform that action at this time.
0 commit comments