2019-11-05 23:52:57 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Integration;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Testing\Concerns\InteractsWithDatabase;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Tests\MockAccountData;
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
class CheckCacheTest extends TestCase
|
|
|
|
{
|
|
|
|
use MockAccountData;
|
|
|
|
use DatabaseTransactions;
|
|
|
|
|
|
|
|
public function setUp() :void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
$this->makeTestData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testWarmedUpCache()
|
|
|
|
{
|
2020-03-21 06:37:30 +01:00
|
|
|
$date_formats = Cache::get('date_formats');
|
2019-11-05 23:52:57 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
$this->assertNotNull($date_formats);
|
2019-11-05 23:52:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testCacheCount()
|
|
|
|
{
|
2020-03-21 06:37:30 +01:00
|
|
|
$date_formats = Cache::get('date_formats');
|
2019-11-05 23:52:57 +01:00
|
|
|
|
2020-03-21 06:37:30 +01:00
|
|
|
$this->assertEquals(14, count($date_formats));
|
2019-11-05 23:52:57 +01:00
|
|
|
}
|
2020-03-21 06:37:30 +01:00
|
|
|
}
|