File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Fixtures/Integration/Controllers Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ public function echoProductType(ProductTypeEnum $productType): ProductTypeEnum
5151 return $ productType ;
5252 }
5353
54+ /**
55+ * @Query()
56+ */
57+ public function echoSomeProductType (): ProductTypeEnum
58+ {
59+ return ProductTypeEnum::FOOD ();
60+ }
61+
5462 /**
5563 * @Query()
5664 */
Original file line number Diff line number Diff line change @@ -934,6 +934,29 @@ public function testEndToEndEnums(): void
934934 ], $ result ->toArray (Debug::RETHROW_INTERNAL_EXCEPTIONS )['data ' ]);
935935 }
936936
937+ public function testEndToEndEnums2 (): void
938+ {
939+ /**
940+ * @var Schema $schema
941+ */
942+ $ schema = $ this ->mainContainer ->get (Schema::class);
943+
944+ $ queryString = '
945+ query {
946+ echoSomeProductType
947+ }
948+ ' ;
949+
950+ $ result = GraphQL::executeQuery (
951+ $ schema ,
952+ $ queryString
953+ );
954+
955+ $ this ->assertSame ([
956+ 'echoProductType ' => 'FOOD '
957+ ], $ result ->toArray (Debug::RETHROW_INTERNAL_EXCEPTIONS )['data ' ]);
958+ }
959+
937960 public function testEndToEndDateTime (): void
938961 {
939962 /**
You can’t perform that action at this time.
0 commit comments