@@ -13,37 +13,37 @@ public function testEachsAreCompiled()
13
13
14
14
public function testIncludesAreCompiled ()
15
15
{
16
- $ this ->assertSame ('<?php echo $__env->make( \'foo \', \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \') ' ));
17
- $ this ->assertSame ('<?php echo $__env->make( \'foo \', [ \'(( \'], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \', [ \'(( \']) ' ));
18
- $ this ->assertSame ('<?php echo $__env->make( \'foo \', [ \'((a) \' => \'((a) \'], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \', [ \'((a) \' => \'((a) \']) ' ));
19
- $ this ->assertSame ('<?php echo $__env->make(name(foo), \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@include(name(foo)) ' ));
16
+ $ this ->assertSame ('<?php echo $__env->make( \'foo \', array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \') ' ));
17
+ $ this ->assertSame ('<?php echo $__env->make( \'foo \', [ \'(( \'], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \', [ \'(( \']) ' ));
18
+ $ this ->assertSame ('<?php echo $__env->make( \'foo \', [ \'((a) \' => \'((a) \'], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@include( \'foo \', [ \'((a) \' => \'((a) \']) ' ));
19
+ $ this ->assertSame ('<?php echo $__env->make(name(foo), array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@include(name(foo)) ' ));
20
20
}
21
21
22
22
public function testIncludeIfsAreCompiled ()
23
23
{
24
- $ this ->assertSame ('<?php if ($__env->exists( \'foo \')) echo $__env->make( \'foo \', \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeIf( \'foo \') ' ));
25
- $ this ->assertSame ('<?php if ($__env->exists(name(foo))) echo $__env->make(name(foo), \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeIf(name(foo)) ' ));
24
+ $ this ->assertSame ('<?php if ($__env->exists( \'foo \')) echo $__env->make( \'foo \', array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeIf( \'foo \') ' ));
25
+ $ this ->assertSame ('<?php if ($__env->exists(name(foo))) echo $__env->make(name(foo), array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeIf(name(foo)) ' ));
26
26
}
27
27
28
28
public function testIncludeWhensAreCompiled ()
29
29
{
30
- $ this ->assertSame ('<?php echo $__env->renderWhen(true, \'foo \', ["foo" => "bar"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \'])); ?> ' , $ this ->compiler ->compileString ('@includeWhen(true, \'foo \', ["foo" => "bar"]) ' ));
31
- $ this ->assertSame ('<?php echo $__env->renderWhen(true, \'foo \', \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \'])); ?> ' , $ this ->compiler ->compileString ('@includeWhen(true, \'foo \') ' ));
30
+ $ this ->assertSame ('<?php echo $__env->renderWhen(true, \'foo \', ["foo" => "bar"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ])); ?> ' , $ this ->compiler ->compileString ('@includeWhen(true, \'foo \', ["foo" => "bar"]) ' ));
31
+ $ this ->assertSame ('<?php echo $__env->renderWhen(true, \'foo \', array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ])); ?> ' , $ this ->compiler ->compileString ('@includeWhen(true, \'foo \') ' ));
32
32
}
33
33
34
34
public function testIncludeUnlessesAreCompiled ()
35
35
{
36
- $ this ->assertSame ('<?php echo $__env->renderUnless(true, \'foo \', ["foo" => "bar"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \'])); ?> ' , $ this ->compiler ->compileString ('@includeUnless(true, \'foo \', ["foo" => "bar"]) ' ));
37
- $ this ->assertSame ('<?php echo $__env->renderUnless(true, \'foo \', ["foo" => "bar_))-))>"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \'])); ?> ' , $ this ->compiler ->compileString ('@includeUnless(true, \'foo \', ["foo" => "bar_))-))>"]) ' ));
38
- $ this ->assertSame ('<?php echo $__env->renderUnless($undefined ?? true, \'foo \', \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \'])); ?> ' , $ this ->compiler ->compileString ('@includeUnless($undefined ?? true, \'foo \') ' ));
36
+ $ this ->assertSame ('<?php echo $__env->renderUnless(true, \'foo \', ["foo" => "bar"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ])); ?> ' , $ this ->compiler ->compileString ('@includeUnless(true, \'foo \', ["foo" => "bar"]) ' ));
37
+ $ this ->assertSame ('<?php echo $__env->renderUnless(true, \'foo \', ["foo" => "bar_))-))>"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ])); ?> ' , $ this ->compiler ->compileString ('@includeUnless(true, \'foo \', ["foo" => "bar_))-))>"]) ' ));
38
+ $ this ->assertSame ('<?php echo $__env->renderUnless($undefined ?? true, \'foo \', array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ])); ?> ' , $ this ->compiler ->compileString ('@includeUnless($undefined ?? true, \'foo \') ' ));
39
39
}
40
40
41
41
public function testIncludeFirstsAreCompiled ()
42
42
{
43
- $ this ->assertSame ('<?php echo $__env->first(["one", "two"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["one", "two"]) ' ));
44
- $ this ->assertSame ('<?php echo $__env->first(["one", "two"], ["foo" => "bar"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["one", "two"], ["foo" => "bar"]) ' ));
45
- $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], ["foo()" => "bar)-))"], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], ["foo()" => "bar)-))"]) ' ));
46
- $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], ["foo" => "bar(-(("], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], ["foo" => "bar(-(("]) ' ));
47
- $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], [(string) "foo()" => "bar(-(("], \Illuminate\Support\Arr::except (get_defined_vars(), [ \'__data \', \'__path \']))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], [(string) "foo()" => "bar(-(("]) ' ));
43
+ $ this ->assertSame ('<?php echo $__env->first(["one", "two"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["one", "two"]) ' ));
44
+ $ this ->assertSame ('<?php echo $__env->first(["one", "two"], ["foo" => "bar"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["one", "two"], ["foo" => "bar"]) ' ));
45
+ $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], ["foo()" => "bar)-))"], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], ["foo()" => "bar)-))"]) ' ));
46
+ $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], ["foo" => "bar(-(("], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], ["foo" => "bar(-(("]) ' ));
47
+ $ this ->assertSame ('<?php echo $__env->first(["issue", "#45424)"], [(string) "foo()" => "bar(-(("], array_diff_key (get_defined_vars(), [ \'__data \' => 1 , \'__path \' => 1 ]))->render(); ?> ' , $ this ->compiler ->compileString ('@includeFirst(["issue", "#45424)"], [(string) "foo()" => "bar(-(("]) ' ));
48
48
}
49
49
}
0 commit comments