MediaUploadedStorer example


class MediaUploadedStorerTest extends TestCase
{
    private MediaUploadedStorer $storer;

    protected function setUp(): void
    {
        Feature::skipTestIfActive('v6.6.0.0', $this);
        $this->storer = new MediaUploadedStorer();
    }

    public function testStoreWithAware(): void
    {
        $event = $this->createMock(MediaUploadedEvent::class);
        $stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayHasKey(MediaUploadedAware::MEDIA_ID, $stored);
    }

    public function testStoreWithNotAware(): void
    {
Home | Imprint | This part of the site doesn't use cookies.