File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \Facades \Route ;
4
+ use Step2dev \LazyBreadcrumb \Breadcrumbs as BreadcrumbsGenerator ;
5
+ use Step2Dev \LazyBreadcrumb \Facades \LazyBreadcrumb ;
6
+ use Step2Dev \LazyBreadcrumb \View \Components \Breadcrumbs ;
7
+ use Step2Dev \LazyBreadcrumb \View \Components \BreadcrumbsJsonLd ;
8
+
9
+ it ('renders the blade components ' , function () {
10
+ $ breadcrumbsComponent = new Breadcrumbs ();
11
+ $ jsonLdComponent = new BreadcrumbsJsonLd ([]);
12
+
13
+ expect ($ breadcrumbsComponent ->render ())->not ()->toBeNull ()
14
+ ->and ($ jsonLdComponent ->render ())->not ()->toBeNull ();
15
+ });
16
+
17
+ it ('runs the test artisan command ' , function () {
18
+ $ this
19
+ ->artisan ('breadcrumbs:test ' )
20
+ ->assertExitCode (0 );
21
+ });
22
+
23
+ it ('resolves the facade ' , function () {
24
+ expect (LazyBreadcrumb::class)->toBeString ()
25
+ ->and (app (LazyBreadcrumb::class))->toBeInstanceOf (BreadcrumbsGenerator::class);
26
+ });
27
+
28
+ it ('registers route macro ' , function () {
29
+ Route::breadcrumbs (function () {
30
+ return ['Dashboard ' ];
31
+ });
32
+
33
+ expect (Route::getMacro ('breadcrumbs ' ))->not ()->toBeNull ();
34
+ });
You can’t perform that action at this time.
0 commit comments