File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Tests ;
4
+
5
+ use Orchestra \Testbench \TestCase as Orchestra ;
6
+ use KhaledSadek \BladeBoringAvatars \Components \Avatar ;
7
+ use Illuminate \Foundation \Testing \Concerns \InteractsWithViews ;
8
+ use KhaledSadek \BladeBoringAvatars \BladeBoringAvatarsServiceProvider ;
9
+
10
+ class AvatarTest extends Orchestra
11
+ {
12
+ use InteractsWithViews;
13
+
14
+ protected function getPackageProviders ($ app )
15
+ {
16
+ return [
17
+ BladeBoringAvatarsServiceProvider::class,
18
+ ];
19
+ }
20
+
21
+ public function test_the_basic_component ()
22
+ {
23
+ $ view = $ this ->blade ('<x-Avatar /> ' );
24
+
25
+ $ view ->assertSee ('width="40" ' , false )
26
+ ->assertSee ('height="40" ' , false );
27
+ }
28
+
29
+ public function test_the_size_option ()
30
+ {
31
+ $ view = $ this ->blade ('<x-Avatar size="120" /> ' );
32
+
33
+ $ view ->assertSee ('width="120" ' , false )
34
+ ->assertSee ('height="120" ' , false );
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments