put test svg in a file

This commit is contained in:
Shish 2015-08-09 21:46:43 +01:00
parent 8fa2fadd44
commit 2d622cf908
2 changed files with 14 additions and 18 deletions

View file

@ -1,21 +1,6 @@
<?php
class SVGHandlerTest { // extends ShimmiePHPUnitTestCase {
function testSVGHander() {
file_put_contents("tests/test.svg", '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="128"
height="128"
id="svg2"
version="1.0">
<g id="layer1">
<path
style="fill:#0000ff;stroke:#213847;stroke-opacity:1"
id="path2383"
d="M 120.07832,64.983688 A 55.573441,53.092484 0 1 1 8.9314423,64.983688 A 55.573441,53.092484 0 1 1 120.07832,64.983688 z" />
</g>
</svg>');
$this->log_in_as_user();
$image_id = $this->post_image("tests/test.svg", "something");
$this->assert_response(302);
@ -23,10 +8,7 @@ class SVGHandlerTest { // extends ShimmiePHPUnitTestCase {
$raw = $this->get_page("get_svg/$image_id");
$this->assertTrue(strpos($raw, "www.w3.org") > 0);
unlink("tests/test.svg");
# FIXME: test that the thumb works
# FIXME: test that it gets displayed properly
}
}

14
tests/test.svg Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="128"
height="128"
id="svg2"
version="1.0">
<g id="layer1">
<path
style="fill:#0000ff;stroke:#213847;stroke-opacity:1"
id="path2383"
d="M 120.0,64.9 A 55.5,53.0 0 1 1 8.9,64.9 A 55.5,53.0 0 1 1 120.0,64.9 z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 368 B