Skip to content
This repository was archived by the owner on Jun 8, 2018. It is now read-only.

Commit fd8930d

Browse files
committed
Update the test
1 parent c96e6cf commit fd8930d

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

demos/layouts/section.blade.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@
44

55
@yield('third')
66

7-
@yield('fourth')
7+
@section('fourth', "<p>Fourth parent.</p>")
8+
9+
@section('fifth')
10+
<p>Fifth parent.</p>
11+
@endsection
12+
13+
@section('sixth')
14+
<p>Sixth parent.</p>
15+
@endsection
16+
17+
@yield('it-has-to-be-removed')

demos/section.blade.php

+12-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@
1010
<p>I don't know what else to say.</p>
1111
@stop
1212

13-
@section('third')
13+
@section('fourth')
14+
@parent
15+
<p>Hello, world!</p>
16+
@stop
17+
18+
@section('fifth')
1419
@parent
15-
<p>Hello, world! Again.</p>
20+
<p>Hello, world!</p>
21+
@endsection
22+
23+
@section('fifth')
24+
@parent
25+
<p>Hello, world!</p>
1626
@stop

tests/section-directive.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ test("the output should contain the content from extended file", t => {
1414
// There could be a lot of line breaks so remove them to be sure that the test will pass
1515
let html = HTML.replace(/\n/g, "")
1616

17-
t.is(html, "<p>Hello, world!</p><p>Laravel Blade Parser works!</p><p>I don't know what else to say.</p><p>Hello, world! Again.</p>")
17+
t.is(html, "<p>Hello, world!</p><p>Laravel Blade Parser works!</p><p>I don't know what else to say.</p><p>Fourth parent.</p><p>Hello, world!</p><p>Fifth parent.</p><p>Hello, world!</p><p>Sixth parent.</p><p>Hello, world!</p>")
1818
})

0 commit comments

Comments
 (0)