File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22namespace PHPJava \Kernel \Mnemonics ;
33
4+ use PHPJava \Exceptions \NotImplementedException ;
45use PHPJava \Kernel \Structures \_Fieldref ;
56use PHPJava \Utilities \ClassResolver ;
67use PHPJava \Utilities \Formatter ;
@@ -36,6 +37,9 @@ public function execute(): void
3637 /**
3738 * @var \PHPJava\Core\JavaClass $className
3839 */
40+ throw new NotImplementedException (
41+ 'Not implemented operation. '
42+ );
3943 return ;
4044 }
4145 $ this ->pushToOperandStack (new $ classObject ());
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public function offsetUnset($offset)
6262
6363 public function offsetSet ($ offset , $ value )
6464 {
65- if (empty ( $ offset) ) {
65+ if ($ offset === null ) {
6666 $ this ->data [] = $ value ;
6767 return ;
6868 }
Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ public function testMultiDimensionArrayWithConstants()
105105 public function testMultiDimensionArrayWithDynamic ()
106106 {
107107 $ actual = $ this ->call ('multiDimensionArrayWithDynamic ' );
108- var_dump ($ actual );
109- $ this ->assertEquals ('Hello World! ' , $ actual );
108+ $ this ->assertCount (3 , $ actual );
109+ $ this ->assertEquals ('Hello ' , (string ) $ actual [0 ]);
110+ $ this ->assertEquals (' ' , (string ) $ actual [1 ]);
111+ $ this ->assertEquals ('World! ' , (string ) $ actual [2 ]);
110112 }
111113}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public static String multiDimensionArrayWithConstants()
4949 return a [0 ][0 ] + "" + a [0 ][1 ] + "" + a [0 ][2 ];
5050 }
5151
52- public static String [] testMultiDimensionArrayWithDynamic ()
52+ public static String [] multiDimensionArrayWithDynamic ()
5353 {
5454 String [][] a = new String [1 ][3 ];
5555 a [0 ][0 ] = "Hello" ;
You can’t perform that action at this time.
0 commit comments