@@ -30,7 +30,7 @@ class DirectiveTest extends TestCase
30
30
/**
31
31
* Example Page Objects.
32
32
*/
33
- protected const EXAMPLE_PAGE_OBJECT = ['component ' => 'Foo/Bar ' , 'props ' => ['foo ' => 'bar ' ], 'url ' => '/test ' , 'version ' => '' ];
33
+ protected const EXAMPLE_PAGE_OBJECT = ['component ' => 'Foo/Bar ' , 'props ' => ['foo ' => 'bar ' ], 'url ' => '/test ' , 'version ' => '' , ' encryptHistory ' => false , ' clearHistory ' => false ];
34
34
35
35
public function setUp (): void
36
36
{
@@ -39,7 +39,7 @@ public function setUp(): void
39
39
$ this ->app ->bind (Gateway::class, FakeGateway::class);
40
40
$ this ->filesystem = m::mock (Filesystem::class);
41
41
42
- $ this ->compiler = new BladeCompiler ($ this ->filesystem , __DIR__ . '/cache/views ' );
42
+ $ this ->compiler = new BladeCompiler ($ this ->filesystem , __DIR__ . '/cache/views ' );
43
43
$ this ->compiler ->directive ('inertia ' , [Directive::class, 'compile ' ]);
44
44
$ this ->compiler ->directive ('inertiaHead ' , [Directive::class, 'compileHead ' ]);
45
45
}
@@ -94,7 +94,7 @@ public function test_inertia_directive_renders_the_root_element(): void
94
94
{
95
95
Config::set (['inertia.ssr.enabled ' => false ]);
96
96
97
- $ html = '<div id="app" data-page="{"component":"Foo\/Bar","props":{"foo":"bar"},"url":"\/test","version":""}"></div> ' ;
97
+ $ html = '<div id="app" data-page="{"component":"Foo\/Bar","props":{"foo":"bar"},"url":"\/test","version":"","encryptHistory":false,"clearHistory":false }"></div> ' ;
98
98
99
99
$ this ->assertSame ($ html , $ this ->renderView ('@inertia ' , ['page ' => self ::EXAMPLE_PAGE_OBJECT ]));
100
100
$ this ->assertSame ($ html , $ this ->renderView ('@inertia() ' , ['page ' => self ::EXAMPLE_PAGE_OBJECT ]));
@@ -116,7 +116,7 @@ public function test_inertia_directive_can_use_a_different_root_element_id(): vo
116
116
{
117
117
Config::set (['inertia.ssr.enabled ' => false ]);
118
118
119
- $ html = '<div id="foo" data-page="{"component":"Foo\/Bar","props":{"foo":"bar"},"url":"\/test","version":""}"></div> ' ;
119
+ $ html = '<div id="foo" data-page="{"component":"Foo\/Bar","props":{"foo":"bar"},"url":"\/test","version":"","encryptHistory":false,"clearHistory":false }"></div> ' ;
120
120
121
121
$ this ->assertSame ($ html , $ this ->renderView ('@inertia(foo) ' , ['page ' => self ::EXAMPLE_PAGE_OBJECT ]));
122
122
$ this ->assertSame ($ html , $ this ->renderView ("@inertia('foo') " , ['page ' => self ::EXAMPLE_PAGE_OBJECT ]));
0 commit comments