beConstructedWith($uploader, $twigEngine, '@Template', '/media/'); } function it_is_initializable(): void { $this->shouldHaveType(FileProvider::class); } function it_implements_provider_interface(): void { $this->shouldHaveType(ProviderInterface::class); } public function it_renders(MediaInterface $media, EngineInterface $twigEngine): void { $twigEngine->render('@Template', ['media' => $media, 'config' => []])->willReturn('content'); $this->render($media, ['config' => []])->shouldReturn('content'); } public function it_uploads(MediaInterface $media, MediaUploaderInterface $uploader): void { $uploader->upload($media, '/media/')->shouldNotBeCalled(); } }