Skip to content

Commit f19a74c

Browse files
committed
no Stringable in php7.4
1 parent 5dbaba5 commit f19a74c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Image.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Tkui;
44

5-
use Stringable;
6-
75
/**
86
* Contract for graphic images.
7+
*
8+
* TODO: extends Stringable
99
*/
10-
interface Image extends Stringable
10+
interface Image
1111
{
1212
public function width(): int;
1313

tests/Widgets/TextTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Tkui\Widgets\Text\Text;
99
use Tkui\Widgets\Text\TextIndex;
1010
use PHPUnit\Framework\MockObject\MockObject;
11+
use Tkui\TclTk\TkImage;
1112

1213
class TextTest extends TestCase
1314
{
@@ -174,7 +175,9 @@ public function insert_embedded_image_into_specified_position()
174175
]);
175176

176177
/** @var Image|MockObject */
177-
$image = $this->createMock(Image::class);
178+
// FIXME: Since Image doesn't have Stringable TkImage is used here, after switching
179+
// to PHP8 it must be changed to Image interface instead of TkImage.
180+
$image = $this->createMock(TkImage::class);
178181
$image->expects($this->once())
179182
->method('__toString')
180183
->willReturn('i0')

0 commit comments

Comments
 (0)