NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2922 most downloaded on Packagist
Spiral Framework testing SDK
Latest stable
3.1.2
Last release 1 months ago
04 Oct 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 34 of 36 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
36 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Ignore line endings in console output assertions by @dualfroz in https://github.com/spiral/testing/pull/94
Full Changelog: https://github.com/spiral/testing/compare/3.1.1...3.1.2
FakeSession: read the default section under the name it is handed
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Keep configured auth transports when faking an actor by @dualfroz in https://github.com/spiral/testing/pull/91
Full Changelog: https://github.com/spiral/testing/compare/3.0.0...3.1.0
Update PHPunit to 13.0.5 by @jcsilkey in https://github.com/spiral/testing/pull/90
Full Changelog: https://github.com/spiral/testing/compare/2.12.2...3.0.0
Handle container proxy scope exceptions in finalizer calls by @Copilot in https://github.com/spiral/testing/pull/89
Full Changelog: https://github.com/spiral/testing/compare/2.12.1...2.12.2
Call finalizer after each request in FakeHTTP by @chiost in https://github.com/spiral/testing/pull/87
Full Changelog: https://github.com/spiral/testing/compare/2.12.0...2.12.1
Use Container->hasBinding() in assertContainerBound() by @roxblnfk in https://github.com/spiral/testing/pull/84
Container->hasBinding() in assertContainerBound() by @roxblnfk in https://github.com/spiral/testing/pull/84Full Changelog: https://github.com/spiral/testing/compare/2.11.0...2.12.0
Fake event dispatcher by @gam6itko in https://github.com/spiral/testing/pull/83
Full Changelog: https://github.com/spiral/testing/compare/2.10.0...2.11.0
FakeHttp make public createJsonRequest, createRequest, handleRequest by @gam6itko in https://github.com/spiral/testing/pull/82
Full Changelog: https://github.com/spiral/testing/compare/2.9.1...2.10.0
Resolve conflict with phpunit 10.5.46 by @roxblnfk in https://github.com/spiral/testing/pull/80
Full Changelog: https://github.com/spiral/testing/compare/2.9.0...2.9.1
Expose FakeHttp middleware methods by @roxblnfk in https://github.com/spiral/testing/pull/78
FakeHttp middleware methods by @roxblnfk in https://github.com/spiral/testing/pull/78
FakeHttp::withoutMiddleware in case of scoped middlewareFakeHttp::withMiddlewareFull Changelog: https://github.com/spiral/testing/compare/2.8.3...2.9.0
Maintenance by @roxblnfk in https://github.com/spiral/testing/pull/76
Full Changelog: https://github.com/spiral/testing/compare/2.8.2...2.8.3
Run interactive command in tests with non-interactive mode by @roxblnfk in https://github.com/spiral/testing/pull/75
Full Changelog: https://github.com/spiral/testing/compare/2.8.1...2.8.2
Always run HttpFaker requests in http scope by @roxblnfk in https://github.com/spiral/testing/pull/74
http scope by @roxblnfk in https://github.com/spiral/testing/pull/74Full Changelog: https://github.com/spiral/testing/compare/2.8.0...2.8.1
Added the ability to run tests in scope by @msmakouz in https://github.com/spiral/testing/pull/73
use Spiral\Testing\Attribute\TestScope;
use Spiral\Testing\Tests\TestCase;
final class ExampleTest extends TestCase
{
#[TestScope('http')]
public function testIndexAction(): void
{
$response = $this->fakeHttp()->get('/');
$response->assertOk();
}
}
Full Changelog: https://github.com/spiral/testing/compare/2.7.0...2.8.0
Add compatibility with Spiral Framework 3.12.0 dispatchers by @msmakouz in https://github.com/spiral/testing/pull/70
Full Changelog: https://github.com/spiral/testing/compare/2.6.4...2.7.0
Fixing config modifications using an attribute by @msmakouz in https://github.com/spiral/testing/pull/69
Full Changelog: https://github.com/spiral/testing/compare/2.6.3...2.6.4
Allow symfony/mime v7.0 by @msmakouz in https://github.com/spiral/testing/pull/68
Full Changelog: https://github.com/spiral/testing/compare/2.6.2...2.6.3
TestResponse::assertStatus display response body on assert fail by @gam6itko in https://github.com/spiral/testing/pull/65
Full Changelog: https://github.com/spiral/testing/compare/2.6.1...2.6.2
Remove the root directory from the filename generated by Scaffolder by @msmakouz in https://github.com/spiral/testing/pull/64
Full Changelog: https://github.com/spiral/testing/compare/2.6.0...2.6.1
Adding the ability to use setUp and tearDown methods in traits by @msmakouz in https://github.com/spiral/testing/pull/62
ServerRequest and Uri by @butschster in https://github.com/spiral/testing/pull/63Full Changelog: https://github.com/spiral/testing/compare/2.5.0...2.6.0
FakeHttp add method getJsonParsedBody by @gam6itko in https://github.com/spiral/testing/pull/61
getJsonParsedBody by @gam6itko in https://github.com/spiral/testing/pull/61Full Changelog: https://github.com/spiral/testing/compare/2.4.1...2.5.0
Fixes problem with rebinding singletons. by @butschster in https://github.com/spiral/testing/pull/60
Full Changelog: https://github.com/spiral/testing/compare/2.4.0...2.4.1
PHP Attributes for Environment and Configuration Variables, and Exception Handling by @butschster in https://github.com/spiral/testing/pull/55
Full Changelog: https://github.com/spiral/testing/compare/2.3.1...2.4.0
Restore original FilesInterface binding after test by @msmakouz in https://github.com/spiral/testing/pull/54
Full Changelog: https://github.com/spiral/testing/compare/2.3.0...2.3.1
FakeHttp add methods patch and patchJson by @gam6itko in https://github.com/spiral/testing/pull/35
patch and patchJson by @gam6itko in https://github.com/spiral/testing/pull/35TestCase::getApp returns TestableKernelInterface by @gam6itko in https://github.com/spiral/testing/pull/37TestCase remove final from public methods by @gam6itko in https://github.com/spiral/testing/pull/40json request header names by @gam6itko in https://github.com/spiral/testing/pull/39TestCase::getApp - init app on first run. by @gam6itko in https://github.com/spiral/testing/pull/36FakeEventDispatcher::dispatch method, when application doesn't have EventDispatcher implementation by @butschster in https://github.com/spiral/testing/pull/51Full Changelog: https://github.com/spiral/testing/compare/2.2.0...2.3.0
Add assertConfigHasFragments by @kastahov in https://github.com/spiral/testing/pull/30
config/http.php
return [
'basePath' => '/',
'headers' => [
'Content-Type' => 'text/html; charset=UTF-8',
],
'middleware' => [],
];
$this->assertConfigHasFragments('http', [
'basePath' => '/'
]);
$this->assertConfigHasFragments('http', [
'headers' => [
'Content-Type' => 'text/html; charset=UTF-8',
],
]);
Full Changelog: https://github.com/spiral/testing/compare/2.1.0...2.2.0
Added ability to fake event dispatcher by @butschster in https://github.com/spiral/testing/pull/29
protected function setUp(): void
{
parent::setUp();
$this->eventDispatcher = $this->fakeEventDispatcher();
}
Assert if an event has a listener attached to it.
$this->eventDispatcher->assertListening(SomeEvent::class, SomeListener::class);
Assert if an event was dispatched based on a truth-test callback.
// Assert if an event dispatched one or more times
$this->eventDispatcher->assertDispatched(SomeEvent::class);
// Assert if an event dispatched one or more times based on a truth-test callback.
$this->eventDispatcher->assertDispatched(SomeEvent::class, static function(SomeEvent $event): bool {
return $event->someParam === 100;
});
Assert if an event was dispatched a number of times.
$this->eventDispatcher->assertDispatchedTimes(SomeEvent::class, 5);
Determine if an event was dispatched based on a truth-test callback.
$this->eventDispatcher->assertNotDispatched(SomeEvent::class);
$this->eventDispatcher->assertNotDispatched(SomeEvent::class, static function(SomeEvent $event): bool {
return $event->someParam === 100;
});
Assert that no events were dispatched.
$this->eventDispatcher->assertNothingDispatched();
Get all the events matching a truth-test callback.
$this->eventDispatcher->dispatched(SomeEvent::class);
// or
$this->eventDispatcher->dispatched(SomeEvent::class, static function(SomeEvent $event): bool {
return $event->someParam === 100;
});
$this->eventDispatcher->hasDispatched(SomeEvent::class);
Full Changelog: https://github.com/spiral/testing/compare/2.0.0...2.1.0
Adds support for spiral/framework 3.0 by @butschster in https://github.com/spiral/testing/pull/19
Full Changelog: https://github.com/spiral/testing/compare/1.2.1...2.0.0
Adds an ability to send Stream via fake HTTP requests by @butschster in https://github.com/spiral/testing/pull/21
Full Changelog: https://github.com/spiral/testing/compare/1.2.1...1.3.0
Replacement TokenTransport registry for fake HTTP requests with actor
Fixing FakeHttp methods visibility, adding assertBodyContains by @msmakouz in https://github.com/spiral/testing/pull/8
Full Changelog: https://github.com/spiral/testing/compare/1.1.0...1.1.1
Adds ability to fire callbacks before bootloaders will be booted by @butschster in https://github.com/spiral/testing/pull/7
Full Changelog: https://github.com/spiral/testing/compare/1.0.0...1.1.0
Nothing published for this version
Adds support for spiral/framework 3.0 by @butschster in https://github.com/spiral/testing/pull/19
Full Changelog: https://github.com/spiral/testing/compare/1.2.1...2.0.0
Nothing published for this version
One column per quarter.