sendPhoto( chat_id: TEST_CHAT_ID, photo: self::TEST_IMAGE_PATH, caption: 'Test Unit: testSendPhoto', ); $this->assertInstanceOf(Message::class, $result); $this->assertEquals('Test Unit: testSendPhoto', $result->getCaption()); } /** * Tests the `sendPhoto` function of the bot instance with a URL. * * @return void */ public function testSendPhotoWithUrl(): void { $result = self::$bot->sendPhoto( chat_id: TEST_CHAT_ID, photo: self::TEST_IMAGE_URL, caption: 'Test Unit: testSendPhotoWithUrl', ); $this->assertInstanceOf(Message::class, $result); $this->assertEquals('Test Unit: testSendPhotoWithUrl', $result->getCaption()); } }