Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 19 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
7 | public function test_minifies_the_output() |
||
8 | { |
||
9 | config(['widgetize.minify_html' => true]); |
||
10 | config(['widgetize.debug_info' => false]); |
||
11 | |||
12 | app()['env'] = 'local'; |
||
13 | |||
14 | $widgetOutput = ' <p> </p> '; |
||
15 | $minified = ' <p> </p> '; |
||
16 | |||
17 | View::shouldReceive('exists')->once()->andReturn(true); |
||
18 | View::shouldReceive('make')->once()->with('hello', ['data' => null], [])->andReturn(app('view')); |
||
19 | View::shouldReceive('render')->once()->andReturn($widgetOutput); |
||
20 | |||
21 | //act |
||
22 | $widget = new Widget7(); |
||
23 | $widgetOutput = render_widget($widget); |
||
24 | $this->assertEquals($minified, $widgetOutput); |
||
25 | } |
||
26 | |||
46 |