Skip to content

Releases: spiral/testing

v2.5.0

20 Sep 11:01
c217343
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.1...2.5.0

v2.4.1

16 Aug 09:19
763ce92
Compare
Choose a tag to compare

What's Changed

Full Changelog: 2.4.0...2.4.1

v2.4.0

04 Jul 13:45
c8d2e4c
Compare
Choose a tag to compare

What's Changed

  • PHP Attributes for Environment and Configuration Variables, and Exception Handling by @butschster in #55
  • InteractsWithMailer, InteractsWithQueue. Ability to use several times by @gam6itko in #56
  • FakeQueue fix job name as string by @gam6itko in #58
  • FakeQueue asserts returns jobs list by @gam6itko in #59

Full Changelog: 2.3.1...2.4.0

v2.3.1

23 May 20:31
8e571fb
Compare
Choose a tag to compare

What's Changed

  • Restore original FilesInterface binding after test by @msmakouz in #54

Full Changelog: 2.3.0...2.3.1

v2.3.0

21 Apr 16:05
430916b
Compare
Choose a tag to compare

What's Changed

  • FakeHttp add methods patch and patchJson by @gam6itko in #35
  • TestCase::getApp returns TestableKernelInterface by @gam6itko in #37
  • TestCase remove final from public methods by @gam6itko in #40
  • fakeHttp proper json request header names by @gam6itko in #39
  • TestCase::getApp - init app on first run. by @gam6itko in #36
  • Fixed acceptable types for queue payload by @butschster in #48
  • Added current scope container by @butschster in #49
  • Added support for roadrunner-bridge 2.x, 3.x by @butschster in #50
  • Fixed problem with returning value using FakeEventDispatcher::dispatch method, when application doesn't have EventDispatcher implementation by @butschster in #51
  • Added assertions for scaffolder commands by @butschster in #53

New Contributors

Full Changelog: 2.2.0...2.3.0

v2.2.0

26 Oct 07:51
e923e94
Compare
Choose a tag to compare

What's Changed

  • Add assertConfigHasFragments by @kastahov in #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',
    ],
]);

New Contributors

  • @kastahov made their first contribution in #30

Full Changelog: 2.1.0...2.2.0

v2.1.0

14 Sep 10:29
ac01294
Compare
Choose a tag to compare

What's Changed

Interaction with Events

protected function setUp(): void
{
    parent::setUp();
    $this->eventDispatcher = $this->fakeEventDispatcher();
}

assertListening

Assert if an event has a listener attached to it.

$this->eventDispatcher->assertListening(SomeEvent::class, SomeListener::class);

assertDispatched

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;
});

assertDispatchedTimes

Assert if an event was dispatched a number of times.

$this->eventDispatcher->assertDispatchedTimes(SomeEvent::class, 5);

assertNotDispatched

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;
});

assertNothingDispatched

Assert that no events were dispatched.

$this->eventDispatcher->assertNothingDispatched();

dispatched

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;
});

hasDispatched

$this->eventDispatcher->hasDispatched(SomeEvent::class);

Full Changelog: 2.0.0...2.1.0

v2.0.0

23 Jul 13:44
56ce61d
Compare
Choose a tag to compare

What's Changed

  • Adds support for spiral/framework 3.0 by @butschster in #19
  • Changing the method of adding bootloaders by @msmakouz in #20
  • Adds an ability to send Stream via fake HTTP requests by @butschster in #21
  • Adding Nyholm bridge, removing DiactorosBootloader by @msmakouz in #22
  • Adds assertion for checking if console command registered by @butschster in #26

Full Changelog: 1.2.1...2.0.0

v1.3.0

21 Jul 06:06
Compare
Choose a tag to compare

What's Changed

  • Adds an ability to send Stream via fake HTTP requests by @butschster in #21

Full Changelog: 1.2.1...1.3.0

v2.0-beta

16 Jun 15:57
b88f2f1
Compare
Choose a tag to compare
v2.0-beta Pre-release
Pre-release

What's Changed

Full Changelog: 1.2.1...2.0.0