11
11
use Mouf \Picotainer \Picotainer ;
12
12
use PHPUnit \Framework \TestCase ;
13
13
use Psr \Container \ContainerInterface ;
14
+ use Symfony \Component \Cache \Adapter \ArrayAdapter ;
15
+ use Symfony \Component \Cache \Adapter \Psr16Adapter ;
16
+ use Symfony \Component \Cache \Psr16Cache ;
14
17
use Symfony \Component \Cache \Simple \ArrayCache ;
15
18
use Symfony \Component \Translation \Translator ;
16
19
use Symfony \Component \Validator \ContainerConstraintValidatorFactory ;
@@ -47,7 +50,7 @@ private function getSchemaFactory(): SchemaFactory
47
50
}
48
51
]);
49
52
50
- $ schemaFactory = new SchemaFactory (new ArrayCache ( ), new BasicAutoWiringContainer ($ container ));
53
+ $ schemaFactory = new SchemaFactory (new Psr16Cache ( new ArrayAdapter () ), new BasicAutoWiringContainer ($ container ));
51
54
$ schemaFactory ->addControllerNamespace ('TheCodingMachine\Graphqlite\Validator\Fixtures\Controllers ' );
52
55
$ schemaFactory ->addTypeNamespace ('TheCodingMachine\Graphqlite\Validator\Fixtures\Types ' );
53
56
$ schemaFactory ->addParameterMiddleware (new AssertParameterMiddleware (new ContainerConstraintValidatorFactory ($ container ), $ container ->get (ValidatorInterface::class), $ container ->get (TranslatorInterface::class)));
@@ -67,7 +70,7 @@ public function testEndToEndThrowException(): void
67
70
68
71
$ queryString = '
69
72
mutation {
70
- createUser(email: "foo@fgdjkerbrtehrthjker .com", password: "short") {
73
+ createUser(email: "foofgdjkerbrtehrthjker .com", password: "short") {
71
74
email
72
75
}
73
76
}
@@ -81,7 +84,7 @@ public function testEndToEndThrowException(): void
81
84
$ result ->setErrorFormatter ([WebonyxErrorHandler::class, 'errorFormatter ' ]);
82
85
83
86
$ 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 ' ]);
85
88
$ this ->assertSame ('email ' , $ errors [0 ]['extensions ' ]['field ' ]);
86
89
$ this ->assertSame ('Validate ' , $ errors [0 ]['extensions ' ]['category ' ]);
87
90
$ this ->assertSame ('This value is too short. It should have 8 characters or more. ' , $ errors [1 ]['message ' ]);
0 commit comments