nginxsonarrradarrplexorganizrdashboardbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpcserverhomepagesabnzbdheimdallembycouchpotatonzbget
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
748 B
30 lines
748 B
7 years ago
|
<?php
|
||
|
|
||
|
namespace Faker\Test\Provider;
|
||
|
|
||
|
use Faker\Generator;
|
||
|
use Faker\Provider\HtmlLorem;
|
||
|
|
||
|
class HtmlLoremTest extends \PHPUnit_Framework_TestCase
|
||
|
{
|
||
|
|
||
|
public function testProvider()
|
||
|
{
|
||
|
$faker = new Generator();
|
||
|
$faker->addProvider(new HtmlLorem($faker));
|
||
|
$node = $faker->randomHtml(6, 10);
|
||
|
$this->assertStringStartsWith("<html>", $node);
|
||
|
$this->assertStringEndsWith("</html>\n", $node);
|
||
|
}
|
||
|
|
||
|
public function testRandomHtmlReturnsValidHTMLString(){
|
||
|
$faker = new Generator();
|
||
|
$faker->addProvider(new HtmlLorem($faker));
|
||
|
$node = $faker->randomHtml(6, 10);
|
||
|
$dom = new \DOMDocument();
|
||
|
$error = $dom->loadHTML($node);
|
||
|
$this->assertTrue($error);
|
||
|
}
|
||
|
|
||
|
}
|