protected function Fix404RedirectCronJobTest::setUp in Redirect 8
Overrides KernelTestBase::setUp
File
- modules/
redirect_404/ tests/ src/ Kernel/ Fix404RedirectCronJobTest.php, line 25
Class
- Fix404RedirectCronJobTest
- Tests the clean up cron job for redirect_404.
Namespace
Drupal\Tests\redirect_404\KernelCode
protected function setUp() {
parent::setUp();
$this
->installSchema('redirect_404', 'redirect_404');
// Insert some records in the test table with a given count and timestamp.
$this
->insert404Row('/test1', 12, 5, strtotime('now'));
$this
->insert404Row('/test2', 5, 3, strtotime('-1 hour'));
$this
->insert404Row('/test3', 315, 0, strtotime('-1 week'));
$this
->insert404Row('/test4', 300, 0, strtotime('-1 month'));
$this
->insert404Row('/test5', 1557, 0, strtotime('-1 week'));
$this
->insert404Row('/test6', 1, 0, strtotime('-1 day'));
}