@@ -43,9 +43,7 @@ public function testAddWorkLogWithoutCustomParams($time_spent, array $expected_r
4343 $ response
4444 );
4545
46- $ actual = $ this ->api ->addWorklog ('JRA-15 ' , $ time_spent );
47-
48- $ this ->assertEquals (json_decode ($ response , true ), $ actual , 'The response is json-decoded. ' );
46+ $ this ->assertApiResponse ($ response , $ this ->api ->addWorklog ('JRA-15 ' , $ time_spent ), false );
4947 }
5048
5149 public static function addWorkLogWithoutCustomParamsDataProvider ()
@@ -68,9 +66,11 @@ public function testAddWorklogWithCustomParams()
6866 $ response
6967 );
7068
71- $ actual = $ this ->api ->addWorklog ('JRA-15 ' , '12m ' , array ('started ' => $ started ));
72-
73- $ this ->assertEquals (json_decode ($ response , true ), $ actual , 'The response is json-decoded. ' );
69+ $ this ->assertApiResponse (
70+ $ response ,
71+ $ this ->api ->addWorklog ('JRA-15 ' , '12m ' , array ('started ' => $ started )),
72+ false
73+ );
7474 }
7575
7676 public function testDeleteWorkLogWithoutCustomParams ()
@@ -84,9 +84,7 @@ public function testDeleteWorkLogWithoutCustomParams()
8484 $ response
8585 );
8686
87- $ actual = $ this ->api ->deleteWorklog ('JRA-15 ' , 11256 );
88-
89- $ this ->assertEquals (json_decode ($ response , true ), $ actual , 'The response is json-decoded. ' );
87+ $ this ->assertApiResponse ($ response , $ this ->api ->deleteWorklog ('JRA-15 ' , 11256 ), false );
9088 }
9189
9290 public function testDeleteWorkLogWithCustomParams ()
@@ -100,9 +98,11 @@ public function testDeleteWorkLogWithCustomParams()
10098 $ response
10199 );
102100
103- $ actual = $ this ->api ->deleteWorklog ('JRA-15 ' , 11256 , array ('custom ' => 'param ' ));
104-
105- $ this ->assertEquals (json_decode ($ response , true ), $ actual , 'The response is json-decoded. ' );
101+ $ this ->assertApiResponse (
102+ $ response ,
103+ $ this ->api ->deleteWorklog ('JRA-15 ' , 11256 , array ('custom ' => 'param ' )),
104+ false
105+ );
106106 }
107107
108108}
0 commit comments