Code Duplication    Length = 12-12 lines in 2 locations

tests/unit/PhpQuickProfilerTest.php 2 locations

@@ 178-189 (lines=12) @@
175
    /**
176
     * @expectedException Exception
177
     */
178
    public function testExplainQueryBadParametersException()
179
    {
180
        $query = 'SELECT * FROM `testing` WHERE `title` = :title';
181
        $invalidParams = array('id' => 1);
182
        $profiler = new PhpQuickProfiler();
183
        $reflectedMethod = $this->getAccessibleMethod($profiler, 'explainQuery');
184
185
        $reflectedMethod->invokeArgs(
186
            $profiler,
187
            array(self::$dbConnection, $query, $invalidParams)
188
        );
189
    }
190
191
    /**
192
     * @dataProvider dataConnectionDrivers
@@ 213-224 (lines=12) @@
210
    /**
211
     * @expectedException Exception
212
     */
213
    public function testGetExplainQueryUnsupportedDriver()
214
    {
215
        $query = 'SELECT * FROM `testing`';
216
        $unsupportedDriver = 'zz';
217
        $profiler = new PhpQuickProfiler();
218
        $reflectedMethod = $this->getAccessibleMethod($profiler, 'getExplainQuery');
219
220
        $reflectedMethod->invokeArgs(
221
            $profiler,
222
            array($query, $unsupportedDriver)
223
        );
224
    }
225
226
    public function testGatherSpeedData()
227
    {