/** * test__toString * * @param $top * @param $mid * @param $bottom * @param $expect * * @covers \Windwalker\Html\HtmlElements * @dataProvider htmlProvider */ public function test__toString($top, $mid, $bottom, $expect) { $this->assertEquals(DomHelper::minify($expect), DomHelper::minify(new HtmlElements(array($top, $mid, $bottom)))); }
/** * Asserts that two variables are equal. * * @param mixed $expected * @param mixed $actual * @param string $message * @param float $delta * @param integer $maxDepth * @param boolean $canonicalize * @param boolean $ignoreCase */ public function assertDomStringEqualsDomString($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE) { $this->assertEquals(DomHelper::minify($expected), DomHelper::minify($actual), $message, $delta, $maxDepth, $canonicalize, $ignoreCase); }
/** * testOffsetUnset * * @covers \Windwalker\Html\HtmlElement::offsetUnset() */ public function testOffsetUnset() { $html = new HtmlElement('div', '', array('id' => 'test-id', 'class' => 'test-class')); $html->offsetUnset('id'); $this->assertNull($html->offsetGet('id')); $this->assertEquals('<div class="test-class"></div>', DomHelper::minify($html)); }