Code Duplication    Length = 7-7 lines in 2 locations

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

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

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

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