File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 14
14
*/
15
15
16
16
$ bot ->onCommand ('start ' , function (Nutgram $ bot ) {
17
- return $ bot ->sendMessage ('Hello, world! ' );
17
+ $ bot ->sendMessage ('Hello, world! ' );
18
18
})->description ('The start command! ' );
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ public function boot(): void
101
101
102
102
$ this ->publishes ([
103
103
self ::CONFIG_PATH => config_path ('nutgram.php ' ),
104
+ self ::ROUTES_PATH => $ this ->telegramRoutes ,
104
105
], 'nutgram ' );
105
106
}
106
107
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \Facades \File ;
4
+ use Nutgram \Laravel \NutgramServiceProvider ;
5
+
6
+ it ('publishes files ' , function () {
7
+ File::delete (base_path ('routes/telegram.php ' ));
8
+
9
+ $ this ->artisan ('vendor:publish ' , [
10
+ '--provider ' => NutgramServiceProvider::class,
11
+ '--tag ' => 'nutgram ' ,
12
+ ]);
13
+
14
+ expect (File::exists (config_path ('nutgram.php ' )))->toBeTrue ()
15
+ ->and (File::exists (base_path ('routes/telegram.php ' )))->toBeTrue ();
16
+ });
You can’t perform that action at this time.
0 commit comments