2015-12-06 13:58:49 -05:00
|
|
|
<?php
|
|
|
|
|
2017-06-13 23:25:37 -05:00
|
|
|
namespace Tests;
|
2015-12-06 13:58:49 -05:00
|
|
|
|
2018-01-14 13:30:55 -06:00
|
|
|
use Cake\Chronos\Chronos;
|
2017-06-13 23:25:37 -05:00
|
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
2015-12-06 13:58:49 -05:00
|
|
|
|
2017-06-13 23:25:37 -05:00
|
|
|
abstract class TestCase extends BaseTestCase
|
|
|
|
{
|
2017-07-01 15:29:49 -05:00
|
|
|
use CreatesApplication;
|
2017-06-24 19:49:09 -05:00
|
|
|
|
2017-10-07 23:29:08 -05:00
|
|
|
/**
|
|
|
|
* Setup tests.
|
|
|
|
*/
|
2020-05-09 18:00:52 +02:00
|
|
|
public function setUp(): void
|
2017-06-24 19:49:09 -05:00
|
|
|
{
|
|
|
|
parent::setUp();
|
2017-10-07 23:29:08 -05:00
|
|
|
|
|
|
|
$this->setKnownUuidFactory();
|
|
|
|
}
|
|
|
|
|
2018-01-14 13:30:55 -06:00
|
|
|
/**
|
|
|
|
* Tear down tests.
|
|
|
|
*/
|
2020-05-09 18:00:52 +02:00
|
|
|
protected function tearDown(): void
|
2018-01-14 13:30:55 -06:00
|
|
|
{
|
|
|
|
parent::tearDown();
|
|
|
|
|
|
|
|
Chronos::setTestNow();
|
|
|
|
}
|
|
|
|
|
2017-10-07 23:29:08 -05:00
|
|
|
/**
|
|
|
|
* Handles the known UUID handling in certain unit tests. Use the "KnownUuid" trait
|
|
|
|
* in order to enable this ability.
|
|
|
|
*/
|
|
|
|
public function setKnownUuidFactory()
|
|
|
|
{
|
|
|
|
// do nothing
|
2017-06-24 19:49:09 -05:00
|
|
|
}
|
2015-12-06 13:58:49 -05:00
|
|
|
}
|