Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Jan 29, 2017
1 parent 59ba2cc commit 166b333
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/Blade.php
@@ -1,4 +1,5 @@
<?php

namespace Jenssegers\Blade;

use Illuminate\Container\Container;
Expand All @@ -9,7 +10,6 @@

class Blade
{

/**
* Container instance.
*
Expand All @@ -27,9 +27,9 @@ class Blade
/**
* Constructor.
*
* @param array $viewPaths
* @param string $cachePath
* @param Container $container
* @param string|array $viewPaths
* @param string $cachePath
* @param ContainerInterface $container
*/
public function __construct($viewPaths, $cachePath, ContainerInterface $container = null)
{
Expand Down Expand Up @@ -59,7 +59,7 @@ protected function setupContainer()

$this->container->bindIf('config', function () {
return [
'view.paths' => (array) $this->viewPaths,
'view.paths' => (array) $this->viewPaths,
'view.compiled' => $this->cachePath,
];
}, true);
Expand Down Expand Up @@ -102,5 +102,4 @@ public function __call($method, $params)
{
return call_user_func_array([$this->container['view'], $method], $params);
}

}
2 changes: 1 addition & 1 deletion tests/BladeTest.php
Expand Up @@ -61,7 +61,7 @@ public function testExtenderBlade()
/**
* Html Writer on sample_output folder
*
* @param string $output The HTML output
* @param string $output The HTML output
* @param string $blade_name The blade file name/path
*
* @return void
Expand Down
7 changes: 7 additions & 0 deletions tests/sample_output/extender.html
Expand Up @@ -9,19 +9,26 @@
Default<br>
Still Default<br>


&lt;script type=&quot;text/javascript&quot;&gt;alert(&quot;Hacked!&quot;);&lt;/script&gt;<br>


Hello, <strong>John Doe</strong>.<br>


hello &lt;strong&gt;John Doe&lt;/strong&gt;
<br>





01/01/2017 23:59:59 <br>


January 01, 2017 11:59 pm <br>


You are not signed in.

<div class="container">
Expand Down
1 change: 0 additions & 1 deletion tests/views/extender.blade.php
Expand Up @@ -5,7 +5,6 @@
@endsection

@section('content')

{{-- you must get 'Default' --}}
{{ isset($name) ? $name : 'Default' }}<br>
{{ $name or 'Still Default' }}<br>
Expand Down

0 comments on commit 166b333

Please sign in to comment.