Code Duplication    Length = 8-9 lines in 3 locations

tests/unit/Controllers/GenericEntityListingControllerTest.php 3 locations

@@ 79-86 (lines=8) @@
76
    /**
77
     * @test
78
     */
79
    public function shouldThrowExceptionWhenEntityClassIsInvalid()
80
    {
81
        $this->expectException(InvalidArgumentException::class);
82
83
        $controller = new GenericEntityListingController($this->controllerHelper, $this->argumentCompiler, [
84
            'entity-class' => "DoesNotExist"
85
        ]);
86
    }
87
88
    /**
89
     * @test
@@ 91-99 (lines=9) @@
88
    /**
89
     * @test
90
     */
91
    public function shouldThrowExceptionOnInvalidNormalizer()
92
    {
93
        $this->expectException(InvalidArgumentException::class);
94
95
        $controller = new GenericEntityListingController($this->controllerHelper, $this->argumentCompiler, [
96
            'entity-class' => SampleEntity::class,
97
            'normalizer' => false
98
        ]);
99
    }
100
101
    /**
102
     * @test
@@ 104-112 (lines=9) @@
101
    /**
102
     * @test
103
     */
104
    public function shouldThrowExceptionOnInvalidEncoder()
105
    {
106
        $this->expectException(InvalidArgumentException::class);
107
108
        $controller = new GenericEntityListingController($this->controllerHelper, $this->argumentCompiler, [
109
            'entity-class' => SampleEntity::class,
110
            'encoder' => false
111
        ]);
112
    }
113
114
    /**
115
     * @test