88use TheCodingMachine \GraphQLite \AbstractQueryProviderTest ;
99use TheCodingMachine \GraphQLite \Fixtures \TestObject ;
1010use TheCodingMachine \GraphQLite \Fixtures \TestObject2 ;
11+ use TheCodingMachine \GraphQLite \NamingStrategy ;
1112
1213class UnionTypeTest extends AbstractQueryProviderTest
1314{
1415 public function testConstructor (): void
1516 {
16- $ unionType = new UnionType ([$ this ->getTestObjectType (), $ this ->getTestObjectType2 ()], $ this ->getTypeMapper ());
17+ $ unionType = new UnionType ([$ this ->getTestObjectType (), $ this ->getTestObjectType2 ()], $ this ->getTypeMapper (), new NamingStrategy () );
1718 $ resolveInfo = $ this ->getMockBuilder (ResolveInfo::class)->disableOriginalConstructor ()->getMock ();
1819 $ type = $ unionType ->resolveType (new TestObject ('foo ' ), null , $ resolveInfo );
1920 $ this ->assertSame ($ this ->getTestObjectType (), $ type );
@@ -23,7 +24,7 @@ public function testConstructor(): void
2324
2425 public function testException (): void
2526 {
26- $ unionType = new UnionType ([$ this ->getTestObjectType (), $ this ->getTestObjectType2 ()], $ this ->getTypeMapper ());
27+ $ unionType = new UnionType ([$ this ->getTestObjectType (), $ this ->getTestObjectType2 ()], $ this ->getTypeMapper (), new NamingStrategy () );
2728 $ this ->expectException (\InvalidArgumentException::class);
2829 $ resolveInfo = $ this ->getMockBuilder (ResolveInfo::class)->disableOriginalConstructor ()->getMock ();
2930 $ unionType ->resolveType ('foo ' , null , $ resolveInfo );
@@ -32,6 +33,6 @@ public function testException(): void
3233 public function testException2 (): void
3334 {
3435 $ this ->expectException (\InvalidArgumentException::class);
35- new UnionType ([new StringType ()], $ this ->getTypeMapper ());
36+ new UnionType ([new StringType ()], $ this ->getTypeMapper (), new NamingStrategy () );
3637 }
3738}
0 commit comments