Code Duplication    Length = 16-16 lines in 3 locations

tests/unit/Services/ArgumentCompilerTest.php 3 locations

@@ 117-132 (lines=16) @@
114
    /**
115
     * @test
116
     */
117
    public function shouldExpectArgumentFactoryToUnderstandString()
118
    {
119
        $this->expectExceptionMessage("Argument 'dolor' could not be understood!");
120
121
        /** @var Request $request */
122
        $request = $this->createMock(Request::class);
123
124
        $this->requestStack->method('getCurrentRequest')->willReturn($request);
125
126
        /** @var Argument $argument */
127
        $argument = $this->createMock(Argument::class);
128
129
        $this->argumentFactory->method('understandsString')->willReturn(false);
130
131
        $this->compiler->buildArguments(['lorem' => 'dolor'], []);
132
    }
133
134
    /**
135
     * @test
@@ 137-152 (lines=16) @@
134
    /**
135
     * @test
136
     */
137
    public function shouldExpectArgumentFactoryToUnderstandArray()
138
    {
139
        $this->expectExceptionMessage("Argument 'array(0=>'dolor',)' could not be understood!");
140
141
        /** @var Request $request */
142
        $request = $this->createMock(Request::class);
143
144
        $this->requestStack->method('getCurrentRequest')->willReturn($request);
145
146
        /** @var Argument $argument */
147
        $argument = $this->createMock(Argument::class);
148
149
        $this->argumentFactory->method('understandsString')->willReturn(false);
150
151
        $this->compiler->buildArguments(['lorem' => ['dolor']], []);
152
    }
153
154
    /**
155
     * @test
@@ 157-172 (lines=16) @@
154
    /**
155
     * @test
156
     */
157
    public function shouldExpectArgumentToBeArrayOrString()
158
    {
159
        $this->expectExceptionMessage("Arguments must be defined as string, array, bool or null!");
160
161
        /** @var Request $request */
162
        $request = $this->createMock(Request::class);
163
164
        $this->requestStack->method('getCurrentRequest')->willReturn($request);
165
166
        /** @var Argument $argument */
167
        $argument = $this->createMock(Argument::class);
168
169
        $this->argumentFactory->method('understandsString')->willReturn(false);
170
171
        $this->compiler->buildArguments(['lorem' => 3.1415], []);
172
    }
173
174
    /**
175
     * @test