graphQlQuery($mutation); $this->assertArrayHasKey('generateCustomerToken', $response); $this->assertInternalType('array', $response['generateCustomerToken']); } /** * Verify customer with invalid credentials */ public function testGenerateCustomerTokenWithInvalidCredentials() { $userName = 'customer@example.com'; $password = 'bad-password'; $mutation = <<expectException(\Exception::class); $this->expectExceptionMessage('GraphQL response contains errors: The account sign-in' . ' ' . 'was incorrect or your account is disabled temporarily. Please wait and try again later.'); $this->graphQlQuery($mutation); } }