@@ -24,6 +24,7 @@ public function toArray()
2424
2525class Json implements \JsonSerializable
2626{
27+ #[\ReturnTypeWillChange]
2728 public function jsonSerialize ()
2829 {
2930 return ['a ' => 1 , 'b ' => 2 , 'c ' => 3 ];
@@ -74,7 +75,7 @@ public function test_underscore()
7475
7576 public function test_now ()
7677 {
77- $ this ->assertInternalType ( ' float ' , _::_ ()->now ());
78+ $ this ->assertNotEmpty ( _::_ ()->now ());
7879 }
7980
8081 public function test_keys_values ()
@@ -126,10 +127,6 @@ public function test_clone_tap()
126127 $ this ->assertSame ($ main , $ tap , 'hard equal ' );
127128 }
128129
129- /**
130- * @expectedException \Ahc\Underscore\UnderscoreException
131- * @expectedExceptionMessage The mixin with name 'notMixedIn' is not defined
132- */
133130 public function test_mixin ()
134131 {
135132 _::mixin ('double ' , function () {
@@ -140,9 +137,12 @@ public function test_mixin()
140137
141138 $ und = underscore ([10 , 20 , 30 ]);
142139
143- $ this ->assertInternalType ( ' callable ' , [$ und , 'double ' ]);
140+ $ this ->assertIsCallable ( [$ und , 'double ' ]);
144141 $ this ->assertSame ([20 , 40 , 60 ], $ und ->double ()->toArray ());
145142
143+ $ this ->expectException (\Ahc \Underscore \UnderscoreException::class);
144+ $ this ->expectExceptionMessage ("The mixin with name 'notMixedIn' is not defined " );
145+
146146 $ und ->notMixedIn ();
147147 }
148148
@@ -168,12 +168,11 @@ public function test_hom()
168168 $ this ->assertSame ([1 => 64 , 3 => 36 , 5 => 16 , 7 => 4 , 9 => 0 ], $ sq );
169169 }
170170
171- /**
172- * @expectedException \Ahc\Underscore\UnderscoreException
173- * @expectedExceptionMessage The 'anon' is not defined
174- */
175171 public function test_hom_throws ()
176172 {
173+ $ this ->expectException (\Ahc \Underscore \UnderscoreException::class);
174+ $ this ->expectExceptionMessage ("The 'anon' is not defined " );
175+
177176 underscore ()->anon ->value ();
178177 }
179178}
0 commit comments