File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Newman \LaravelGraphQLTestUtils \Tests \Drivers ;
6+
7+ use Newman \LaravelGraphQLTestUtils \Drivers \NullDriver ;
8+ use Newman \LaravelGraphQLTestUtils \Tests \TestCase ;
9+
10+ class NullDriverTest extends TestCase
11+ {
12+ public function test_it_returns_expected_url_prefix (): void
13+ {
14+ $ this ->assertNull ($ this ->getDriver ()->getUrlPrefix ());
15+ }
16+
17+ public function test_it_returns_expected_http_method (): void
18+ {
19+ $ this ->assertNull ($ this ->getDriver ()->getHttpMethodForSchema ('default ' ));
20+ $ this ->assertNull ($ this ->getDriver ()->getHttpMethodForSchema ('postable ' ));
21+ }
22+
23+ private function getDriver (): NullDriver
24+ {
25+ return $ this ->app ->make ('laravel-graphql-utils-driver:null ' );
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ public function test_it_can_set_different_drivers(): void
1818
1919 $ this ->assertEquals ('custom ' , GraphQLTesting::getDriverName ());
2020
21+ GraphQLTesting::useNullDriver ();
22+
23+ $ this ->assertEquals ('null ' , GraphQLTesting::getDriverName ());
24+
2125 GraphQLTesting::useRebing ();
2226
2327 $ this ->assertEquals ('rebing ' , GraphQLTesting::getDriverName ());
You can’t perform that action at this time.
0 commit comments