File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 22
33namespace 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
Original file line number Diff line number Diff line change 88use Tkui \Widgets \Text \Text ;
99use Tkui \Widgets \Text \TextIndex ;
1010use PHPUnit \Framework \MockObject \MockObject ;
11+ use Tkui \TclTk \TkImage ;
1112
1213class 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 ' )
You can’t perform that action at this time.
0 commit comments