summaryrefslogtreecommitdiffstats
path: root/php-Faker-php8.patch
blob: 7c591a0e66d05967ffd546987d05852070306e1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From c351d8ff9cf1962b1f16d4d4a148722411c86956 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 26 Mar 2021 15:48:03 +0100
Subject: [PATCH 1/2] fix Deprecated: Required parameter $isInFuture follows
 optional parameter $interval

---
 test/Faker/Provider/DateTimeTest.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Faker/Provider/DateTimeTest.php b/test/Faker/Provider/DateTimeTest.php
index 30386f3c..da72984e 100644
--- a/test/Faker/Provider/DateTimeTest.php
+++ b/test/Faker/Provider/DateTimeTest.php
@@ -209,7 +209,7 @@ final class DateTimeTest extends TestCase
      *
      * @dataProvider providerDateTimeInInterval
      */
-    public function testDateTimeInInterval($start, $interval = "+5 days", $isInFuture)
+    public function testDateTimeInInterval($start, $interval, $isInFuture)
     {
         $date = DateTimeProvider::dateTimeInInterval($start, $interval);
         $this->assertInstanceOf('\DateTime', $date);
-- 
2.30.2

From e9b8e6e9304333d8d578b06766c4d36b82a04428 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 26 Mar 2021 15:49:50 +0100
Subject: [PATCH 2/2] fix tests expectation

---
 test/Faker/Provider/TextTest.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Faker/Provider/TextTest.php b/test/Faker/Provider/TextTest.php
index b817b6d4..aa7bd2da 100644
--- a/test/Faker/Provider/TextTest.php
+++ b/test/Faker/Provider/TextTest.php
@@ -37,7 +37,7 @@ final class TextTest extends TestCase
      */
     public function testTextMaxLength($length)
     {
-        $this->assertLessThan($length, $this->generator->realText($length));
+        $this->assertLessThan($length, strlen($this->generator->realText($length)));
     }
 
     public function testTextMaxIndex()
-- 
2.30.2