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

@@ 68-74 (lines=7) @@
65
     * @expectedException \IBM\Watson\Common\Exception\HydrationException
66
     * @expectedExceptionMessage Error (3) when trying to json_decode response
67
     */
68
    public function testHydrateFailsWhenJsonDecodeFails()
69
    {
70
        $response = m::mock(Response::class, [200, ['Content-Type' => 'application/json'], '{"brokenJson}'])
71
            ->makePartial();
72
73
        $this->hydrator->hydrate($response, \stdClass::class);
74
    }
75
}
76