@@ -33,7 +33,7 @@ public function testGlobTypeMapper()
3333
3434 $ cache = new ArrayCache ();
3535
36- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
36+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
3737
3838 $ this ->assertSame ([TestObject::class], $ mapper ->getSupportedClasses ());
3939 $ this ->assertTrue ($ mapper ->canMapClassToType (TestObject::class));
@@ -43,7 +43,7 @@ public function testGlobTypeMapper()
4343 $ this ->assertFalse ($ mapper ->canMapNameToType ('NotExists ' ));
4444
4545 // Again to test cache
46- $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
46+ $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
4747 $ this ->assertTrue ($ anotherMapperSameCache ->canMapClassToType (TestObject::class));
4848 $ this ->assertTrue ($ anotherMapperSameCache ->canMapNameToType ('Foo ' ));
4949
@@ -61,7 +61,7 @@ public function testGlobTypeMapperDuplicateTypesException()
6161
6262 $ typeGenerator = $ this ->getTypeGenerator ();
6363
64- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\DuplicateTypes ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), new NullCache ());
64+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\DuplicateTypes ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), new NullCache ());
6565
6666 $ this ->expectException (DuplicateMappingException::class);
6767 $ mapper ->canMapClassToType (TestType::class);
@@ -77,7 +77,7 @@ public function testGlobTypeMapperDuplicateInputTypesException()
7777
7878 $ typeGenerator = $ this ->getTypeGenerator ();
7979
80- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\DuplicateInputTypes ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), new NullCache ());
80+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\DuplicateInputTypes ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), new NullCache ());
8181
8282 $ this ->expectException (DuplicateMappingException::class);
8383 $ this ->expectExceptionMessage ('The class \'TheCodingMachine\GraphQLite\Fixtures\TestObject \' should be mapped to only one GraphQL Input type. Two methods are pointing via the @Factory annotation to this class: \'TheCodingMachine\GraphQLite\Fixtures\DuplicateInputTypes\TestFactory::myFactory \' and \'TheCodingMachine\GraphQLite\Fixtures\DuplicateInputTypes\TestFactory2::myFactory \'' );
@@ -94,7 +94,7 @@ public function testGlobTypeMapperClassNotFoundException()
9494
9595 $ typeGenerator = $ this ->getTypeGenerator ();
9696
97- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\BadClassType ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), new NullCache ());
97+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\BadClassType ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), new NullCache ());
9898
9999 $ this ->expectException (ClassNotFoundException::class);
100100 $ this ->expectExceptionMessage ("Could not autoload class 'Foobar' defined in @Type annotation of class 'TheCodingMachine \\GraphQLite \\Fixtures \\BadClassType \\TestType' " );
@@ -111,7 +111,7 @@ public function testGlobTypeMapperNameNotFoundException()
111111
112112 $ typeGenerator = $ this ->getTypeGenerator ();
113113
114- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), new NullCache ());
114+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), new NullCache ());
115115
116116 $ this ->expectException (CannotMapTypeException::class);
117117 $ mapper ->mapNameToType ('NotExists ' , $ this ->getTypeMapper ());
@@ -132,7 +132,7 @@ public function testGlobTypeMapperInputType()
132132
133133 $ cache = new ArrayCache ();
134134
135- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
135+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
136136
137137 $ this ->assertTrue ($ mapper ->canMapClassToInputType (TestObject::class));
138138
@@ -141,7 +141,7 @@ public function testGlobTypeMapperInputType()
141141 $ this ->assertSame ('TestObjectInput ' , $ inputType ->name );
142142
143143 // Again to test cache
144- $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
144+ $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
145145
146146 $ this ->assertTrue ($ anotherMapperSameCache ->canMapClassToInputType (TestObject::class));
147147 $ this ->assertSame ('TestObjectInput ' , $ anotherMapperSameCache ->mapClassToInputType (TestObject::class, $ this ->getTypeMapper ())->name );
@@ -167,7 +167,7 @@ public function testGlobTypeMapperExtend()
167167
168168 $ cache = new ArrayCache ();
169169
170- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
170+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
171171
172172 $ type = $ mapper ->mapClassToType (TestObject::class, null , $ this ->getTypeMapper ());
173173
@@ -178,7 +178,7 @@ public function testGlobTypeMapperExtend()
178178 $ this ->assertFalse ($ mapper ->canExtendTypeForName ('NotExists ' , $ type , $ this ->getTypeMapper ()));
179179
180180 // Again to test cache
181- $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
181+ $ anotherMapperSameCache = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Types ' , $ typeGenerator , $ this ->getInputTypeGenerator (), $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
182182 $ this ->assertTrue ($ anotherMapperSameCache ->canExtendTypeForClass (TestObject::class, $ type , $ this ->getTypeMapper ()));
183183 $ this ->assertTrue ($ anotherMapperSameCache ->canExtendTypeForName ('TestObject ' , $ type , $ this ->getTypeMapper ()));
184184
@@ -195,7 +195,7 @@ public function testEmptyGlobTypeMapper()
195195
196196 $ cache = new ArrayCache ();
197197
198- $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Integration\Controllers ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ cache );
198+ $ mapper = new GlobTypeMapper ('TheCodingMachine\GraphQLite\Fixtures\Integration\Controllers ' , $ typeGenerator , $ inputTypeGenerator , $ this ->getInputTypeUtils (), $ container , new \TheCodingMachine \GraphQLite \AnnotationReader (new AnnotationReader ()), new NamingStrategy (), $ this -> getLockFactory (), $ cache );
199199
200200 $ this ->assertSame ([], $ mapper ->getSupportedClasses ());
201201 }
0 commit comments