File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
11
11
### Deprecated
12
12
### Removed
13
13
### Fixed
14
+ - Ensure download and upload path variables are defined.
14
15
### Security
15
16
16
17
## [ 0.70.0] - 2020-12-21
Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ class Telegram
90
90
*
91
91
* @var string
92
92
*/
93
- protected $ upload_path ;
93
+ protected $ upload_path = '' ;
94
94
95
95
/**
96
96
* Download path
97
97
*
98
98
* @var string
99
99
*/
100
- protected $ download_path ;
100
+ protected $ download_path = '' ;
101
101
102
102
/**
103
103
* MySQL integration
Original file line number Diff line number Diff line change 18
18
use Longman \TelegramBot \TelegramLog ;
19
19
20
20
/**
21
- * @package TelegramTest
21
+ * @link https://github.com/php-telegram-bot/core
22
22
* @author Avtandil Kikabidze <[email protected] >
23
23
* @copyright Avtandil Kikabidze <[email protected] >
24
24
* @license http://opensource.org/licenses/mit-license.php The MIT License (MIT)
25
- * @link https://github.com/php-telegram-bot/core
25
+ * @package TelegramTest
26
26
*/
27
27
class TelegramTest extends TestCase
28
28
{
@@ -133,6 +133,18 @@ public function testAddCustomCommandsPaths(): void
133
133
self ::assertCount (4 , $ tg ->getCommandsPaths ());
134
134
}
135
135
136
+ public function testSettingDownloadUploadPaths (): void
137
+ {
138
+ self ::assertEmpty ($ this ->telegram ->getDownloadPath ());
139
+ self ::assertEmpty ($ this ->telegram ->getUploadPath ());
140
+
141
+ $ this ->telegram ->setDownloadPath ('/down/below ' );
142
+ $ this ->telegram ->setUploadPath ('/up/above ' );
143
+
144
+ self ::assertSame ('/down/below ' , $ this ->telegram ->getDownloadPath ());
145
+ self ::assertSame ('/up/above ' , $ this ->telegram ->getUploadPath ());
146
+ }
147
+
136
148
public function testGetCommandsList (): void
137
149
{
138
150
$ commands = $ this ->telegram ->getCommandsList ();
You can’t perform that action at this time.
0 commit comments