File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -89,16 +89,16 @@ public function testArrayAccess()
8989 $ this ->list [] = $ violation ;
9090
9191 $ this ->assertSame ($ violation , $ this ->list [0 ]);
92- $ this ->assertTrue ( isset ( $ this ->list [ 0 ]) );
92+ $ this ->assertArrayHasKey ( 0 , $ this ->list );
9393
9494 unset($ this ->list [0 ]);
9595
96- $ this ->assertFalse ( isset ( $ this ->list [ 0 ]) );
96+ $ this ->assertArrayNotHasKey ( 0 , $ this ->list );
9797
9898 $ this ->list [10 ] = $ violation ;
9999
100100 $ this ->assertSame ($ violation , $ this ->list [10 ]);
101- $ this ->assertTrue ( isset ( $ this ->list [ 10 ]) );
101+ $ this ->assertArrayHasKey ( 10 , $ this ->list );
102102 }
103103
104104 public function testToString ()
Original file line number Diff line number Diff line change @@ -62,15 +62,15 @@ public function testLegacyArrayAccess()
6262
6363 $ this ->assertSame ('Group 1 ' , $ sequence [0 ]);
6464 $ this ->assertSame ('Group 2 ' , $ sequence [1 ]);
65- $ this ->assertTrue ( isset ( $ sequence[ 0 ]) );
66- $ this ->assertFalse ( isset ( $ sequence[ 2 ]) );
65+ $ this ->assertArrayHasKey ( 0 , $ sequence );
66+ $ this ->assertArrayNotHasKey ( 2 , $ sequence );
6767 unset($ sequence [0 ]);
68- $ this ->assertFalse ( isset ( $ sequence[ 0 ]) );
68+ $ this ->assertArrayNotHasKey ( 0 , $ sequence );
6969 $ sequence [] = 'Group 3 ' ;
70- $ this ->assertTrue ( isset ( $ sequence[ 2 ]) );
70+ $ this ->assertArrayHasKey ( 2 , $ sequence );
7171 $ this ->assertSame ('Group 3 ' , $ sequence [2 ]);
7272 $ sequence [0 ] = 'Group 1 ' ;
73- $ this ->assertTrue ( isset ( $ sequence[ 0 ]) );
73+ $ this ->assertArrayHasKey ( 0 , $ sequence );
7474 $ this ->assertSame ('Group 1 ' , $ sequence [0 ]);
7575 }
7676
You can’t perform that action at this time.
0 commit comments