1111use Mouf \Picotainer \Picotainer ;
1212use PHPUnit \Framework \TestCase ;
1313use Psr \Container \ContainerInterface ;
14+ use Symfony \Component \Cache \Adapter \ArrayAdapter ;
15+ use Symfony \Component \Cache \Adapter \Psr16Adapter ;
16+ use Symfony \Component \Cache \Psr16Cache ;
1417use Symfony \Component \Cache \Simple \ArrayCache ;
1518use Symfony \Component \Translation \Translator ;
1619use Symfony \Component \Validator \ContainerConstraintValidatorFactory ;
@@ -47,7 +50,7 @@ private function getSchemaFactory(): SchemaFactory
4750 }
4851 ]);
4952
50- $ schemaFactory = new SchemaFactory (new ArrayCache ( ), new BasicAutoWiringContainer ($ container ));
53+ $ schemaFactory = new SchemaFactory (new Psr16Cache ( new ArrayAdapter () ), new BasicAutoWiringContainer ($ container ));
5154 $ schemaFactory ->addControllerNamespace ('TheCodingMachine\Graphqlite\Validator\Fixtures\Controllers ' );
5255 $ schemaFactory ->addTypeNamespace ('TheCodingMachine\Graphqlite\Validator\Fixtures\Types ' );
5356 $ schemaFactory ->addParameterMiddleware (new AssertParameterMiddleware (new ContainerConstraintValidatorFactory ($ container ), $ container ->get (ValidatorInterface::class), $ container ->get (TranslatorInterface::class)));
@@ -67,7 +70,7 @@ public function testEndToEndThrowException(): void
6770
6871 $ queryString = '
6972 mutation {
70- createUser(email: "foo@fgdjkerbrtehrthjker .com", password: "short") {
73+ createUser(email: "foofgdjkerbrtehrthjker .com", password: "short") {
7174 email
7275 }
7376 }
@@ -81,7 +84,7 @@ public function testEndToEndThrowException(): void
8184 $ result ->setErrorFormatter ([WebonyxErrorHandler::class, 'errorFormatter ' ]);
8285
8386 $ errors = $ result ->toArray (Debug::RETHROW_UNSAFE_EXCEPTIONS )['errors ' ];
84- $ this ->assertSame ('The email \'"foo@fgdjkerbrtehrthjker .com" \' is not a valid email. ' , $ errors [0 ]['message ' ]);
87+ $ this ->assertSame ('The email \'"foofgdjkerbrtehrthjker .com" \' is not a valid email. ' , $ errors [0 ]['message ' ]);
8588 $ this ->assertSame ('email ' , $ errors [0 ]['extensions ' ]['field ' ]);
8689 $ this ->assertSame ('Validate ' , $ errors [0 ]['extensions ' ]['category ' ]);
8790 $ this ->assertSame ('This value is too short. It should have 8 characters or more. ' , $ errors [1 ]['message ' ]);
0 commit comments