Macros in Tests

  • Test suites often repeat the same setup and assertions
  • A macro can make assertions more readable and reduce boilerplate
Http::sendsGraphQL();

// perform actions under test

Http::assertGraphQLCall('UpdateUser', [
    'email' => 'user@example.com',
]);

← / → navigate · N notes · Esc exit