1717use Sylius \Component \Core \Model \ChannelInterface ;
1818use Sylius \Component \Core \Model \ProductInterface ;
1919use Sylius \Component \Resource \Model \ResourceInterface ;
20- use Symfony \Component \HttpFoundation \File \File ;
20+ use Symfony \Component \HttpFoundation \File \UploadedFile ;
2121
2222final class MediaSpec extends ObjectBehavior
2323{
24- function it_is_initializable (): void
24+ public function it_is_initializable (): void
2525 {
2626 $ this ->shouldHaveType (Media::class);
2727 }
2828
29- function it_is_a_resource (): void
29+ public function it_is_a_resource (): void
3030 {
3131 $ this ->shouldHaveType (ResourceInterface::class);
3232 }
3333
34- function it_implements_media_interface (): void
34+ public function it_implements_media_interface (): void
3535 {
3636 $ this ->shouldHaveType (MediaInterface::class);
3737 }
3838
39- function it_allows_access_via_properties (): void
39+ public function it_allows_access_via_properties (): void
4040 {
4141 $ this ->setCode ('file ' );
4242 $ this ->getCode ()->shouldReturn ('file ' );
@@ -47,7 +47,7 @@ function it_allows_access_via_properties(): void
4747 $ this ->setPath ('/media/video ' );
4848 $ this ->getPath ()->shouldReturn ('/media/video ' );
4949
50- $ file = new File (__DIR__ . '/MediaSpec.php ' );
50+ $ file = new UploadedFile (__DIR__ . '/MediaSpec.php ' , ' originalName ' );
5151
5252 $ this ->setFile ($ file );
5353 $ this ->getFile ()->shouldReturn ($ file );
@@ -56,7 +56,7 @@ function it_allows_access_via_properties(): void
5656 $ this ->getMimeType ()->shouldReturn ('video/mp4 ' );
5757 }
5858
59- function it_toggles (): void
59+ public function it_toggles (): void
6060 {
6161 $ this ->enable ();
6262 $ this ->isEnabled ()->shouldReturn (true );
@@ -65,7 +65,7 @@ function it_toggles(): void
6565 $ this ->isEnabled ()->shouldReturn (false );
6666 }
6767
68- function it_associates_products (ProductInterface $ firstProduct , ProductInterface $ secondProduct ): void
68+ public function it_associates_products (ProductInterface $ firstProduct , ProductInterface $ secondProduct ): void
6969 {
7070 $ this ->addProduct ($ firstProduct );
7171 $ this ->hasProduct ($ firstProduct )->shouldReturn (true );
@@ -77,7 +77,7 @@ function it_associates_products(ProductInterface $firstProduct, ProductInterface
7777 $ this ->hasProduct ($ firstProduct )->shouldReturn (false );
7878 }
7979
80- function it_associates_sections (SectionInterface $ firstSection , SectionInterface $ secondSection ): void
80+ public function it_associates_sections (SectionInterface $ firstSection , SectionInterface $ secondSection ): void
8181 {
8282 $ this ->addSection ($ firstSection );
8383 $ this ->hasSection ($ firstSection )->shouldReturn (true );
@@ -89,7 +89,7 @@ function it_associates_sections(SectionInterface $firstSection, SectionInterface
8989 $ this ->hasSection ($ firstSection )->shouldReturn (false );
9090 }
9191
92- function it_associates_channels (ChannelInterface $ firstChannel , ChannelInterface $ secondChannel ): void
92+ public function it_associates_channels (ChannelInterface $ firstChannel , ChannelInterface $ secondChannel ): void
9393 {
9494 $ this ->addChannel ($ firstChannel );
9595 $ this ->hasChannel ($ firstChannel )->shouldReturn (true );
0 commit comments