function test_cleanFormat() { $svg = '<!--SHAPE{"type":"rect"}-->' . '<!--LAYOUT<rect class="s-rect"/>-->' . '<ellipse class="s-ellipse"/>'; $format = array('svg' => $svg, 'state' => array()); Layout::cleanFormat($format); $this->assertEquals('<ellipse class="s-ellipse"/>', $format['svg']); $this->assertArrayNotHasKey('state', $format); }