Merge pull request #1577 from inverse/develop

Fixed issue with html unit tests
This commit is contained in:
Taylor Otwell 2013-01-10 14:08:40 -08:00
commit bd11b2a8af
1 changed files with 6 additions and 6 deletions

View File

@ -36,9 +36,9 @@ public function testGeneratingScript()
$html2 = HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'); $html2 = HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js');
$html3 = HTML::script('foo.js', array('type' => 'text/javascript')); $html3 = HTML::script('foo.js', array('type' => 'text/javascript'));
$this->assertEquals('<script src="http://localhost/foo.js"></script>'."\n", $html1); $this->assertEquals('<script src="http://localhost/foo.js"></script>'.PHP_EOL, $html1);
$this->assertEquals('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>'."\n", $html2); $this->assertEquals('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>'.PHP_EOL, $html2);
$this->assertEquals('<script src="http://localhost/foo.js" type="text/javascript"></script>'."\n", $html3); $this->assertEquals('<script src="http://localhost/foo.js" type="text/javascript"></script>'.PHP_EOL, $html3);
} }
/** /**
@ -52,9 +52,9 @@ public function testGeneratingStyle()
$html2 = HTML::style('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js'); $html2 = HTML::style('http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js');
$html3 = HTML::style('foo.css', array('media' => 'print')); $html3 = HTML::style('foo.css', array('media' => 'print'));
$this->assertEquals('<link href="http://localhost/foo.css" media="all" type="text/css" rel="stylesheet">'."\n", $html1); $this->assertEquals('<link href="http://localhost/foo.css" media="all" type="text/css" rel="stylesheet">'.PHP_EOL, $html1);
$this->assertEquals('<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js" media="all" type="text/css" rel="stylesheet">'."\n", $html2); $this->assertEquals('<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js" media="all" type="text/css" rel="stylesheet">'.PHP_EOL, $html2);
$this->assertEquals('<link href="http://localhost/foo.css" media="print" type="text/css" rel="stylesheet">'."\n", $html3); $this->assertEquals('<link href="http://localhost/foo.css" media="print" type="text/css" rel="stylesheet">'.PHP_EOL, $html3);
} }
/** /**