File tree Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Expand file tree Collapse file tree 1 file changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -149,31 +149,25 @@ public function testLoginWithPage() {
149149 /**
150150 * Establish the expectation for the output of the query
151151 */
152- $ user = new WP_User ( $ this ->admin );
153- $ token = _testAuth::_getSignedToken ( $ user );
154- $ expected = [
155- 'data ' => [
156- 'login ' => [
157- 'authToken ' => $ token ,
158- 'user ' => [
159- 'username ' => 'testuser ' ,
160- 'pages ' => [
161- 'edges ' => [
162- [
163- 'node ' => [
164- 'id ' => $ global_id ,
165- 'title ' => 'Test Page Title ' ,
166- 'content ' => apply_filters ( 'the_content ' , $ args ['post_content ' ] ),
167- ],
168- ],
169- ],
152+ $ expected_user = [
153+ 'username ' => 'testuser ' ,
154+ 'pages ' => [
155+ 'edges ' => [
156+ [
157+ 'node ' => [
158+ 'id ' => $ global_id ,
159+ 'title ' => 'Test Page Title ' ,
160+ 'content ' => apply_filters ( 'the_content ' , $ args ['post_content ' ] ),
170161 ],
171162 ],
172163 ],
173164 ],
174165 ];
175166
176- $ this ->assertEquals ( $ expected , $ actual );
167+ $ token = $ actual ['data ' ]['login ' ]['authToken ' ];
168+ $ this ->assertNotEmpty ( $ token );
169+ $ this ->assertEquals ( $ expected_user , $ actual ['data ' ]['login ' ]['user ' ] );
170+
177171 }
178172
179173 public function testLoginWithValidUserThatWasJustDeleted () {
You can’t perform that action at this time.
0 commit comments