This commit is contained in:
2022-11-25 21:21:30 +01:00
parent 2d6df0d5f0
commit 94deb06f52
132 changed files with 44887 additions and 41368 deletions

View File

@@ -1,4 +1,5 @@
<?php
/** DomFramework - Tests
* @package domframework
* @author Dominique Fournier <dominique@fournier38.fr>
@@ -13,52 +14,59 @@ use Domframework\Outputhtml;
class OutputhtmlTest extends \PHPUnit_Framework_TestCase
{
/** Entry null */
public function testlayout1 ()
{
$this->expectOutputRegex ("#<body>\s+</body>#");
$output = new Outputhtml ();
$res = $output->out ("");
}
public function testlayout1()
{
$this->expectOutputRegex("#<body>\s+</body>#");
$output = new Outputhtml();
$res = $output->out("");
}
public function testlayout2 ()
{
$this->expectOutputRegex("#data#");
$output = new Outputhtml ();
$res = $output->out ("data");
}
public function testlayout2()
{
$this->expectOutputRegex("#data#");
$output = new Outputhtml();
$res = $output->out("data");
}
public function testlayout3 ()
{
$this->expectOutputRegex("#data#");
$output = new Outputhtml ();
$res = $output->out ("data", "title");
}
public function testlayout3()
{
$this->expectOutputRegex("#data#");
$output = new Outputhtml();
$res = $output->out("data", "title");
}
public function testlayout4 ()
{
$this->expectOutputString("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
public function testlayout4()
{
$this->expectOutputString("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
<html>
<body>
Text
"." "."
" . " " . "
</body>
</html>\n");
$output = new Outputhtml ();
$output->out ("data", "title", FALSE, FALSE, "Tests/layout.html" );
}
$output = new Outputhtml();
$output->out("data", "title", false, false, "Tests/layout.html");
}
public function testlayout5 ()
{
$this->expectOutputString("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
public function testlayout5()
{
$this->expectOutputString("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">
<html>
<body>
Text
VARIABLE
</body>
</html>\n");
$output = new Outputhtml ();
$variable = array ("var"=>"VARIABLE");
$output->out ("data", "title", FALSE, FALSE, "Tests/layout.html",
null, $variable);
}
$output = new Outputhtml();
$variable = array ("var" => "VARIABLE");
$output->out(
"data",
"title",
false,
false,
"Tests/layout.html",
null,
$variable
);
}
}