Skip to content

Commit 19d05c2

Browse files
committed
bug fix
1 parent 18e3b62 commit 19d05c2

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,22 @@ namespace iBrand\Poster\Test;
6262
class ShareImgTest extends BaseTest
6363
{
6464
/** @test */
65-
public function TestConfig()
66-
{
67-
$config = config('filesystems.disks');
68-
69-
$this->assertArrayHasKey('MiniProgramShare', $config);
70-
}
71-
72-
/** @test */
73-
public function TestGenerateShareImage()
74-
{
75-
$savePath = '/baidu/';
76-
$saveName = md5(time() . mt_rand(10000, 99999)) . '_share' . '.png';
77-
$route = 'https://m.baidu.com/';
78-
79-
MiniProgramShareImgTest::generateShareImage($savePath, $saveName, $route);
80-
$this->assertTrue(file_exists(__DIR__ . $savePath . $saveName));
81-
}
65+
public function TestConfig()
66+
{
67+
$config = config('filesystems.disks');
68+
69+
$this->assertArrayHasKey('MiniProgramShare', $config);
70+
}
71+
72+
/** @test */
73+
public function TestGenerateShareImage()
74+
{
75+
$saveName = config('phantommagick.directory') . '/' . md5(time() . mt_rand(10000, 99999)) . '_share' . '.png';
76+
$route = 'https://m.baidu.com/';
77+
78+
MiniProgramShareImgTest::generateShareImage($saveName, $route);
79+
$this->assertTrue(file_exists(__DIR__ . '/' . $saveName));
80+
}
8281
}
8382
8483
```

0 commit comments

Comments
 (0)