Setup CloudConvert to take webpage screenshots
This commit is contained in:
parent
0d393bd172
commit
45c71bbb47
7 changed files with 177 additions and 38 deletions
22
tests/Feature/Jobs/SaveScreenshotTest.php
Executable file
22
tests/Feature/Jobs/SaveScreenshotTest.php
Executable file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature\Jobs;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
|
||||
class SaveScreenshotTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test_example()
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
}
|
|
@ -85,14 +85,15 @@ class ArticlesTest extends TestCase
|
|||
public function dateScopeReturnsExpectedArticlesForDecember(): void
|
||||
{
|
||||
Article::factory()->create([
|
||||
'created_at' => Carbon::now()->setMonth(11)->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->setMonth(11)->toDateTimeString(),
|
||||
'created_at' => Carbon::now()->setDay(11)->setMonth(11)->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->setDay(11)->setMonth(11)->toDateTimeString(),
|
||||
]);
|
||||
|
||||
Article::factory()->create([
|
||||
'created_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
|
||||
'created_at' => Carbon::now()->setMonth(12)->setDay(12)->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->setMonth(12)->setDay(12)->toDateTimeString(),
|
||||
]);
|
||||
|
||||
$this->assertCount(1, Article::date(date('Y'), 12)->get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue