mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
37 lines
794 B
PHP
37 lines
794 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Flasher\Tests\Prime\Storage\Bag;
|
|
|
|
use Flasher\Prime\Notification\Envelope;
|
|
use Flasher\Prime\Notification\Notification;
|
|
use Flasher\Prime\Storage\Bag\StaticBag;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class StaticBagTest extends TestCase
|
|
{
|
|
private StaticBag $staticBag;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->staticBag = new StaticBag();
|
|
}
|
|
|
|
public function testGetAndSetMethods(): void
|
|
{
|
|
$this->assertSame([], $this->staticBag->get());
|
|
|
|
$envelopes = [
|
|
new Envelope(new Notification()),
|
|
new Envelope(new Notification()),
|
|
];
|
|
|
|
$this->staticBag->set($envelopes);
|
|
|
|
$this->assertEquals($envelopes, $this->staticBag->get());
|
|
}
|
|
}
|