update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -0,0 +1,51 @@
<?php
class ViewTest extends TestCase {
public function setUp()
{
parent::setUp();
$this->view = app('DaveJamesMiller\Breadcrumbs\View');
$this->breadcrumbs = [
(object) [
'title' => 'Home',
'url' => '/',
'first' => true,
'last' => false,
],
(object) [
'title' => 'Not a link',
'url' => null, // Test non-links
'first' => false,
'last' => false,
],
(object) [
'title' => 'Blog & < >', // Test HTML escaping
'url' => '/blog',
'first' => false,
'last' => false,
],
(object) [
'title' => 'Sample Post',
'url' => '/blog/123',
'first' => false,
'last' => true,
],
];
}
public function testBootstrap2()
{
$html = $this->view->render('breadcrumbs::bootstrap2', $this->breadcrumbs);
$this->assertXmlStringEqualsXmlFile(__DIR__ . '/../fixtures/bootstrap2.html', $html);
}
public function testBootstrap3()
{
$html = $this->view->render('breadcrumbs::bootstrap3', $this->breadcrumbs);
$this->assertXmlStringEqualsXmlFile(__DIR__ . '/../fixtures/bootstrap3.html', $html);
}
}