Skip to content
Snippets Groups Projects
Commit ae84e252 authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 885ac827
Branches
Tags
Loading
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment