Code Duplication    Length = 11-11 lines in 2 locations

tests/WidgetTest.php 2 locations

@@ 18-28 (lines=11) @@
15
        render_widget($widget);
16
    }
17
18
    public function test_default_view_name_is_figured_out_correctly()
19
    {
20
        View::shouldReceive('exists')->once()->andReturn(true);
21
        View::shouldReceive('make')->once()->with('Widgets::Foo.Widget1View', ['data' => 'foo'], [])->andReturn(app('view'));
22
        View::shouldReceive('render')->once()->andReturn('<br>');
23
        \App::shouldReceive('call')->once()->andReturn('foo');
24
25
        //act
26
        $widget = new \App\Widgets\Foo\Widget1();
27
        render_widget($widget);
28
    }
29
30
    public function test_context_as_is_passes_to_view_correctly()
31
    {
@@ 30-40 (lines=11) @@
27
        render_widget($widget);
28
    }
29
30
    public function test_context_as_is_passes_to_view_correctly()
31
    {
32
        View::shouldReceive('exists')->once()->andReturn(true);
33
        View::shouldReceive('make')->once()->with('hello', ['myData' => 'foo'], [])->andReturn(app('view'));
34
        View::shouldReceive('render')->once()->andReturn('<br>');
35
        \App::shouldReceive('call')->once()->andReturn('foo');
36
37
        //act
38
        $widget = new Widget3();
39
        render_widget($widget);
40
    }
41
42
    public function test_controller_method_is_called_on_some_other_class()
43
    {