Code Duplication    Length = 7-7 lines in 2 locations

src/Common/tests/Hydrator/ArrayHydratorTest.php 1 location

@@ 51-57 (lines=7) @@
48
     * @expectedException \IBM\Watson\Common\Exception\HydrationException
49
     * @expectedExceptionMessage Error (3) when trying to json_decode response
50
     */
51
    public function testHydrateFailsWhenJsonDecodeFails()
52
    {
53
        $response = m::mock(Response::class, [200, ['Content-Type' => 'application/json'], '{"brokenJson}'])
54
            ->makePartial();
55
56
        $this->hydrator->hydrate($response);
57
    }
58
}
59

src/Common/tests/Hydrator/ModelHydratorTest.php 1 location

@@ 61-67 (lines=7) @@
58
     * @expectedException \IBM\Watson\Common\Exception\HydrationException
59
     * @expectedExceptionMessage Error (3) when trying to json_decode response
60
     */
61
    public function testHydrateFailsWhenJsonDecodeFails()
62
    {
63
        $response = m::mock(Response::class, [200, ['Content-Type' => 'application/json'], '{"brokenJson}'])
64
            ->makePartial();
65
66
        $this->hydrator->hydrate($response, \stdClass::class);
67
    }
68
}