Skip to content

Version v0.7.0 - Mock Expectations

Choose a tag to compare

@Sammyjo20 Sammyjo20 released this 07 Feb 17:54
d81733b

New Features

You can now assert that Saloon has sent the correct response in your application! The following expectation methods have been added:

  • AssertSent (accepts request classes, closures and URL patterns)
  • AssertNotSent (inverse of assert sent)
  • AssertSentJson (accepts a class and an array to check both are equal)
  • AssertNothingSent
  • AssertSentCount

Here's how you can use it:

// Laravel (using Facade)

Saloon::assertSent(GetForgeServerRequest::class);

// Normal PHP

$mockClient->assertSent(GetForgeServerRequest::class);

What's Changed

Full Changelog: v0.6.6...v0.7.0