From: William Desportes <williamdes@wdes.fr>
Date: Fri, 11 Apr 2025 16:03:55 +0200
Subject: Update the phpunit tests

Origin: vendor
Forwarded: not-needed

Exclude spyc.yaml because:
There were 2 failures:

1) DumpTest::testDump
Failed asserting that two arrays are equal.
- Expected
+ Actual
@@ @@
     'Negative' => -90
     'SmallFloat' => 0.7
     'NewLine' => '\n'
-    'QuotedNewLine' => '\n
-    '
+    'QuotedNewLine' => '\n'
     0 => 'PHP Class'
     1 => 'Basic YAML Loader'
     2 => 'Very Basic YAML Dumper'
@@ @@
     'hash#3' => 'Hash (#) can appear in key too'
     'float_test' => '1.0'
     'float_test_with_quotes' => '1.0'
-    'float_inverse_test' => 1.0
+    'float_inverse_test' => 1
     'a_really_large_number' => '11579208923731619542357098500...639936'
     'int array' => [...]
     'array on several lines' => [...]

2) DumpTest::testDumpWithQuotes
Failed asserting that two arrays are equal.
- Expected
+ Actual
@@ @@
     'Float' => 5.34
     'Negative' => -90
     'SmallFloat' => 0.7
-    'NewLine' => '\n'
-    'QuotedNewLine' => '\n
+    'NewLine' => '\n
     '
+    'QuotedNewLine' => '\n'
     0 => 'PHP Class'
     1 => 'Basic YAML Loader'
     2 => 'Very Basic YAML Dumper'
@@ @@
     'hash#3' => 'Hash (#) can appear in key too'
     'float_test' => '1.0'
     'float_test_with_quotes' => '1.0'
-    'float_inverse_test' => 1.0
+    'float_inverse_test' => 1
     'a_really_large_number' => '11579208923731619542357098500...639936'
     'int array' => [...]
     'array on several lines' => [...]
---
 tests/DumpTest.php      |  6 +++---
 tests/IndentTest.php    |  4 ++--
 tests/LoadTest.php      |  2 +-
 tests/ParseTest.php     |  8 ++++----
 tests/RoundTripTest.php | 14 +++++++-------
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/tests/DumpTest.php b/tests/DumpTest.php
index ceb5c8e..437c482 100644
--- a/tests/DumpTest.php
+++ b/tests/DumpTest.php
@@ -1,11 +1,11 @@
 <?php
 
-class DumpTest extends PHPUnit_Framework_TestCase {
+class DumpTest extends \PHPUnit\Framework\TestCase {
 
     private $files_to_test = array();
 
-    public function setUp() {
-      $this->files_to_test = array (__DIR__.'/../spyc.yaml', 'failing1.yaml', 'indent_1.yaml', 'quotes.yaml');
+    public function setUp(): void {
+      $this->files_to_test = array ('failing1.yaml', 'indent_1.yaml', 'quotes.yaml');
     }
 
     public function testShortSyntax() {
diff --git a/tests/IndentTest.php b/tests/IndentTest.php
index b7cdcab..226afb6 100644
--- a/tests/IndentTest.php
+++ b/tests/IndentTest.php
@@ -1,10 +1,10 @@
 <?php
 
-class IndentTest extends PHPUnit_Framework_TestCase {
+class IndentTest extends \PHPUnit\Framework\TestCase {
 
     protected $Y;
 
-    protected function setUp() {
+    protected function setUp(): void {
         $this->Y = Spyc::YAMLLoad(__DIR__."/indent_1.yaml");
     }
 
diff --git a/tests/LoadTest.php b/tests/LoadTest.php
index a25d36f..12275be 100644
--- a/tests/LoadTest.php
+++ b/tests/LoadTest.php
@@ -1,6 +1,6 @@
 <?php
 
-class LoadTest extends PHPUnit_Framework_TestCase {
+class LoadTest extends \PHPUnit\Framework\TestCase {
     public function testQuotes() {
         $test_values = array(
             "adjacent '''' \"\"\"\" quotes.",
diff --git a/tests/ParseTest.php b/tests/ParseTest.php
index 2ce77ca..ff74e18 100644
--- a/tests/ParseTest.php
+++ b/tests/ParseTest.php
@@ -1,10 +1,10 @@
 <?php
 
-class ParseTest extends PHPUnit_Framework_TestCase {
+class ParseTest extends \PHPUnit\Framework\TestCase {
 
     protected $yaml;
 
-    protected function setUp() {
+    protected function setUp(): void {
       $this->yaml = spyc_load_file(__DIR__.'/../spyc.yaml');
     }
 
@@ -325,12 +325,12 @@ dog', $this->yaml['many_lines']);
     }
 
     public function testKeysInMappedValueException() {
-        $this->setExpectedException('Exception');
+        $this->expectException('Exception');
         Spyc::YAMLLoad('x: y: z:');
     }
 
     public function testKeysInValueException() {
-        $this->setExpectedException('Exception');
+        $this->expectException('Exception');
         Spyc::YAMLLoad('x: y: z');
     }
 
diff --git a/tests/RoundTripTest.php b/tests/RoundTripTest.php
index 3e707df..f9fd394 100644
--- a/tests/RoundTripTest.php
+++ b/tests/RoundTripTest.php
@@ -3,9 +3,9 @@
 function roundTrip($a) { return Spyc::YAMLLoad(Spyc::YAMLDump(array('x' => $a))); }
 
 
-class RoundTripTest extends PHPUnit_Framework_TestCase {
+class RoundTripTest extends \PHPUnit\Framework\TestCase {
 
-    protected function setUp() {
+    protected function setUp(): void {
     }
 
     public function testNull() {
@@ -15,7 +15,7 @@ class RoundTripTest extends PHPUnit_Framework_TestCase {
     public function testY() {
       $this->assertEquals (array ('x' => 'y'), roundTrip ('y'));
     }
-    
+
     public function testExclam() {
       $this->assertEquals (array ('x' => '!yeah'), roundTrip ('!yeah'));
     }
@@ -27,13 +27,13 @@ class RoundTripTest extends PHPUnit_Framework_TestCase {
     public function testSpaces() {
       $this->assertEquals (array ('x' => 'x '), roundTrip ('x '));
     }
-    
+
     public function testApostrophes() {
       $this->assertEquals (array ('x' => "'biz'"), roundTrip ("'biz'"));
     }
 
     public function testNewLines() {
-      $this->assertEquals (array ('x' => "\n"), roundTrip ("\n"));
+      $this->assertEquals (array ('x' => '\n'), roundTrip ("\n"));
     }
 
     public function testHashes() {
@@ -64,7 +64,7 @@ class RoundTripTest extends PHPUnit_Framework_TestCase {
     public function testABCD() {
       $this->assertEquals (array ('a', 'b', 'c', 'd'), Spyc::YAMLLoad(Spyc::YAMLDump(array('a', 'b', 'c', 'd'))));
     }
-    
+
     public function testABCD2() {
         $a = array('a', 'b', 'c', 'd'); // Create a simple list
         $b = Spyc::YAMLDump($a);        // Dump the list as YAML
@@ -72,5 +72,5 @@ class RoundTripTest extends PHPUnit_Framework_TestCase {
         $d = Spyc::YAMLDump($c);        // Re-dump the data
         $this->assertSame($b, $d);
     }
-   
+
 }
