function testLongLines()
    {
        $html = <<<HTML
<html><body>
<div class="test">This is the beggining of the sentence.. and it's a really long sentence, with a lot of words that should not be wrapped.</div>
</body>
</html>
HTML;
        $tidy = tidy_parse_string($html, $this->tidy_conf);
        $value = mock_node_iteration($tidy->root(), "test");
        $test_value = "This is the beggining of the sentence.. and it's a really long sentence, with a lot of words that should not be wrapped.";
        $this->assertNotEqual($value, "", "The Class attribute was not found.");
        $this->assertEqual($value, $test_value, "Long values are being wrapped.");
    }
예제 #2
0
    function testNestedValue()
    {
        $html = <<<HTML
<html><body>

<p class="test">
  <span class="value">
    <span class="value">Puppies Rule!</span>
    <span>But kittens are better!</span>
 </span>
</p>

</body>
</html>
HTML;
        $tidy = tidy_parse_string($html, $this->tidy_conf);
        $value = mock_node_iteration($tidy->root(), "test");
        $test_value = "Puppies Rule! But kittens are better!";
        $this->assertNotEqual($value, "", "The Class attribute was not found.");
        $this->assertEqual($value, $test_value, "Value-title is not working.");
    }