33namespace Pontedilana \WeasyprintBundle \Tests ;
44
55use PHPUnit \Framework \TestCase ;
6- use Pontedilana \PhpWeasyPrint \Image ;
76use Pontedilana \PhpWeasyPrint \Pdf ;
87use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
98use Symfony \Component \Filesystem \Filesystem ;
@@ -40,11 +39,6 @@ public function testServiceIsAvailableOutOfTheBox(): void
4039
4140 $ this ->assertInstanceof (Pdf::class, $ pdf );
4241 $ this ->assertEquals ('weasyprint ' , $ pdf ->getBinary ());
43-
44- $ this ->assertFalse ($ container ->has ('weasyprint.image ' ), 'The image service is available. ' );
45-
46- $ this ->expectException (ServiceNotFoundException::class);
47- $ image = $ container ->get ('weasyprint.image ' );
4842 }
4943
5044 public function testChangeBinaries (): void
@@ -60,13 +54,6 @@ public function testChangeBinaries(): void
6054
6155 $ this ->assertInstanceof (Pdf::class, $ pdf );
6256 $ this ->assertEquals ('/custom/binary/for/weasyprint ' , $ pdf ->getBinary ());
63-
64- $ this ->assertTrue ($ container ->has ('weasyprint.image ' ));
65-
66- $ image = $ container ->get ('weasyprint.image ' );
67-
68- $ this ->assertInstanceof (Image::class, $ image );
69- $ this ->assertEquals ('/custom/binary/for/weasyprint ' , $ image ->getBinary ());
7057 }
7158
7259 public function testChangeTemporaryFolder (): void
@@ -90,15 +77,4 @@ public function testDisablePdf(): void
9077
9178 $ this ->assertFalse ($ container ->has ('weasyprint.pdf ' ), 'The pdf service is NOT available. ' );
9279 }
93-
94- public function testEnableImage (): void
95- {
96- $ this ->kernel ->setConfigurationFilename (__DIR__ . '/fixtures/config/enable_image.yml ' );
97- $ this ->kernel ->boot ();
98-
99- $ container = $ this ->kernel ->getContainer ();
100-
101- $ this ->assertTrue ($ container ->has ('weasyprint.pdf ' ), 'The pdf service is available. ' );
102- $ this ->assertTrue ($ container ->has ('weasyprint.image ' ), 'The image service is NOT available. ' );
103- }
10480}
0 commit comments