From 69378db7771644bc30a4cfe8f81e8c79c4fe4ecc Mon Sep 17 00:00:00 2001 From: programarivm Date: Fri, 20 Dec 2024 18:59:46 +0100 Subject: [PATCH] Updated tests --- tests/unit/SanSignalTest.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/unit/SanSignalTest.php b/tests/unit/SanSignalTest.php index 03e9f2d3..caedbff2 100644 --- a/tests/unit/SanSignalTest.php +++ b/tests/unit/SanSignalTest.php @@ -22,17 +22,15 @@ public static function setUpBeforeClass(): void */ public function e4_d5_exd5_Qxd5() { - $movetext = '1.e4 d5 2.exd5 Qxd5'; - - $board = new Board(); - - $sanSignal = new SanSignal(self::$function, $movetext, $board); - $expectedBalance = [ 0, 1.0, 0.25, 0.50, -1.0 ]; $expectedSignal = [ 0.0, 2.0, -1.67, -0.16, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; - $this->assertSame($expectedBalance, $sanSignal->balance[3]); - $this->assertSame($expectedSignal, $sanSignal->signal); + $movetext = '1.e4 d5 2.exd5 Qxd5'; + + $sanSignal = new SanSignal(self::$function, $movetext, new Board()); + + $this->assertEquals($expectedBalance, $sanSignal->balance[3]); + $this->assertEquals($expectedSignal, $sanSignal->signal); } /** @@ -46,6 +44,6 @@ public function A59() $sanSignal = new SanSignal(self::$function, $A59, new Board()); - $this->assertSame($expectedSignal, $sanSignal->signal); + $this->assertEquals($expectedSignal, $sanSignal->signal); } }