File tree 1 file changed +5
-8
lines changed
test/Field/Page/Fieldtype/FieldtypeMapMarker
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 8
8
namespace ProcessWire \GraphQL \Test \FieldtypeMapMarker ;
9
9
10
10
use ProcessWire \GraphQL \Test \GraphQLTestCase ;
11
- use ProcessWire \GraphQL \Test \Field \Page \Fieldtype \Traits \FieldtypeTestTrait ;
12
11
use ProcessWire \GraphQL \Utils ;
13
12
14
13
class CaseThreeTest extends GraphQLTestCase
@@ -37,7 +36,6 @@ public function testValue()
37
36
$ lng = -0.098562 ;
38
37
$ address = "23576 Broadway, Chicago " ;
39
38
$ zoom = 3 ;
40
- $ name = "updated-building-with-location " ;
41
39
$ variables = [
42
40
"page " => [
43
41
"id " => $ skyscraper ->id ,
@@ -50,30 +48,29 @@ public function testValue()
50
48
],
51
49
];
52
50
$ res = self ::execute ($ query , $ variables );
53
- $ expectedMap = $ skyscraper ->map ;
54
- $ actualMap = $ res ->data ->skyscraper ->map ;
51
+ $ actualMap = Utils::pages ()->get ($ skyscraper ->id )->map ;
55
52
self ::assertEquals (
56
53
$ skyscraper ->id ,
57
54
$ res ->data ->skyscraper ->id ,
58
55
"Updates the correct page. "
59
56
);
60
57
self ::assertEquals (
61
- $ expectedMap -> lat ,
58
+ $ lat ,
62
59
$ actualMap ->lat ,
63
60
"Updates lat correctly. "
64
61
);
65
62
self ::assertEquals (
66
- $ expectedMap -> lng ,
63
+ $ lng ,
67
64
$ actualMap ->lng ,
68
65
"Updates lng correctly. "
69
66
);
70
67
self ::assertEquals (
71
- $ expectedMap -> address ,
68
+ $ address ,
72
69
$ actualMap ->address ,
73
70
"Updates address correctly. "
74
71
);
75
72
self ::assertEquals (
76
- $ expectedMap -> zoom ,
73
+ $ zoom ,
77
74
$ actualMap ->zoom ,
78
75
"Updates zoom correctly. "
79
76
);
You can’t perform that action at this time.
0 commit comments