18declare(strict_types=1);
23use PHPUnit\Framework\Attributes\Depends;
24use PHPUnit\Framework\MockObject\MockObject;
25use PHPUnit\Framework\TestCase;
32 $this->expectException(\InvalidArgumentException::class);
33 $transformation->transform(
'<svg></svg>');
39 $this->expectNotToPerformAssertions();
43 #[Depends('testTransformWithSvgInstance')]
48 $result = $transformation->transform($svg_mock);
49 $this->assertIsString($result);
50 $this->assertStringStartsWith(
"data:image/svg+xml;base64,", $result);
51 $this->assertStringEndsWith(base64_encode($svg_mock->__toString()), $result);
56 $svg_mock = $this->createMock(\
ILIAS\
Data\SVG::class);
57 $svg_mock->method(
'__toString')->willReturn(
'<svg></svg>');
Data transfer object that carries the raw SVG data as a string, created from trusted sources.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.