File: 0004-Fix-deprecation-warnings-in-test.patch

package info (click to toggle)
libphp-swiftmailer 6.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,164 kB
  • sloc: php: 27,203; sh: 36; makefile: 16
file content (33 lines) | stat: -rw-r--r-- 1,650 bytes parent folder | download
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
From: Robin Gustafsson <robin@rgson.se>
Date: Thu, 14 Dec 2023 17:57:31 +0100
Subject: Fix deprecation warnings in test

"shouldNotReceive(), never(), times(0) chaining additional invocation
count methods has been deprecated and will throw an exception in a
future version of Mockery"
---
 tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php b/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php
index 3ed1c94..91f5b49 100644
--- a/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php
+++ b/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php
@@ -252,7 +252,7 @@ class Swift_CharacterStream_ArrayCharacterStreamTest extends \SwiftMailerTestCas
         $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8');
 
         $os->shouldReceive('setReadPointer')
-           ->between(0, 1)
+           ->atMost()->times(1)
            ->with(0);
         $os->shouldReceive('read')->once()->andReturn(pack('C*', 0xD0));
         $os->shouldReceive('read')->once()->andReturn(pack('C*', 0x94));
@@ -284,7 +284,7 @@ class Swift_CharacterStream_ArrayCharacterStreamTest extends \SwiftMailerTestCas
         $stream = new Swift_CharacterStream_ArrayCharacterStream($factory, 'utf-8');
 
         $os->shouldReceive('setReadPointer')
-           ->between(0, 1)
+           ->atMost()->times(1)
            ->with(0);
         $os->shouldReceive('read')->once()->andReturn(pack('C*', 0xD0));
         $os->shouldReceive('read')->once()->andReturn(pack('C*', 0x94));