Commit ae84e252 authored by alexpott's avatar alexpott

Issue #2108643 by ParisLiakos: Fixed AttributeTest fails when using debian's phpunit binary.

parent 885ac827
......@@ -92,12 +92,13 @@ public function testIterate() {
public function testPrint() {
$attribute = new Attribute(array('class' => array('example-class'), 'id' => 'example-id', 'enabled' => TRUE));
$html = '<div' . (string) $attribute . '></div>';
$this->assertSelectEquals('div.example-class', '', 1, $html);
$this->assertSelectEquals('div.example-class2', '', 0, $html);
$content = $this->randomName();
$html = '<div' . (string) $attribute . '>' . $content . '</div>';
$this->assertSelectEquals('div.example-class', $content, 1, $html);
$this->assertSelectEquals('div.example-class2', $content, 0, $html);
$this->assertSelectEquals('div#example-id', '', 1, $html);
$this->assertSelectEquals('div#example-id2', '', 0, $html);
$this->assertSelectEquals('div#example-id', $content, 1, $html);
$this->assertSelectEquals('div#example-id2', $content, 0, $html);
$this->assertTrue(strpos($html, 'enabled') !== FALSE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment