File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Tests ;
4
4
5
+ use Illuminate \Contracts \Support \Renderable ;
6
+ use Illuminate \Contracts \Support \Htmlable ;
5
7
use Illuminate \Support \Facades \Response ;
6
8
use Illuminate \Support \Facades \View ;
9
+ use Imanghafoori \Widgets \Widget ;
7
10
8
11
class WidgetTest extends TestCase
9
12
{
@@ -106,6 +109,15 @@ public function test_json_widgets()
106
109
$ this ->assertEquals ('123 ' , $ a );
107
110
}
108
111
112
+ public function test_widget_renderable_and_htmlable ()
113
+ {
114
+ $ widget = new Widget ();
115
+ $ this ->assertInstanceOf (Htmlable::class, $ widget );
116
+ $ this ->assertInstanceOf (Renderable::class, $ widget );
117
+ $ this ->assertEquals ('' , $ widget ->toHtml ());
118
+ $ this ->assertEquals ('' , $ widget ->render ());
119
+ }
120
+
109
121
public function test_json_widgets_as_string ()
110
122
{
111
123
Response::shouldReceive ('json ' )->once ()->with ('222111 ' , 200 )->andReturn ('123 ' );
You can’t perform that action at this time.
0 commit comments