File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
tests/Integration/Commands Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 32
32
<env name =" TELEGRAM_CHANNEL" value =" null" />
33
33
<env name =" FATHOM_SITE_ID" value =" 1234" />
34
34
<env name =" FATHOM_TOKEN" value =" 5678" />
35
+ <env name =" UNSPLASH_ACCESS_KEY" value =" abcde" />
35
36
</php >
36
37
</phpunit >
Original file line number Diff line number Diff line change 3
3
use App \Console \Commands \SyncArticleImages ;
4
4
use App \Models \Article ;
5
5
use Illuminate \Foundation \Testing \DatabaseMigrations ;
6
+ use Illuminate \Support \Facades \Http ;
6
7
use Tests \TestCase ;
7
8
8
9
uses (TestCase::class);
9
10
uses (DatabaseMigrations::class);
10
11
11
12
12
13
test ('hero image url is updated for published articles with hero image ' , function () {
14
+ Http::fake (function () {
15
+ return [
16
+ 'urls ' => [
17
+ 'raw ' => 'https://images.unsplash.com/photo-1584824486509-112e4181ff6b?ixid=M3w2NTgwOTl8MHwxfGFsbHx8fHx8fHx8fDE3Mjc2ODMzMzZ8&ixlib=rb-4.0.3 '
18
+ ]
19
+ ];
20
+ });
21
+
13
22
$ article = Article::factory ()->create ([
14
23
'hero_image ' => 'sxiSod0tyYQ ' ,
15
24
'submitted_at ' => now (),
You can’t perform that action at this time.
0 commit comments