File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Coderello \SharedData \Tests ;
4
4
5
+ use Coderello \SharedData \Providers \SharedDataServiceProvider ;
5
6
use Coderello \SharedData \SharedData ;
6
7
use Illuminate \Contracts \Support \Arrayable ;
7
8
use JsonSerializable ;
@@ -293,11 +294,26 @@ public function testForget()
293
294
$ this ->assertSame ([], $ this ->sharedData ->get ());
294
295
}
295
296
296
- public function testDirective ()
297
+ public function testBladeDirective ()
297
298
{
298
299
$ this ->assertEquals (
299
300
shared ()->render (),
300
301
view ('shared ' )->render ()
301
302
);
302
303
}
304
+
305
+ /**
306
+ * @depends testBladeDirective
307
+ */
308
+ public function testBladeDirectiveCustom ()
309
+ {
310
+ $ this ->app ->make ('config ' )->set ('shared-data.blade_directive ' , 'shared_custom ' );
311
+
312
+ $ this ->app ->register (SharedDataServiceProvider::class);
313
+
314
+ $ this ->assertEquals (
315
+ shared ()->render (),
316
+ view ('shared-custom ' )->render ()
317
+ );
318
+ }
303
319
}
Original file line number Diff line number Diff line change
1
+ @shared_custom
You can’t perform that action at this time.
0 commit comments