2015-12-06 18:58:49 +00:00
|
|
|
<?php
|
|
|
|
|
2017-06-14 04:25:37 +00:00
|
|
|
namespace Tests;
|
2015-12-06 18:58:49 +00:00
|
|
|
|
2018-01-14 19:30:55 +00:00
|
|
|
use Cake\Chronos\Chronos;
|
2017-06-14 04:25:37 +00:00
|
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
2015-12-06 18:58:49 +00:00
|
|
|
|
2017-06-14 04:25:37 +00:00
|
|
|
abstract class TestCase extends BaseTestCase
|
|
|
|
{
|
2017-07-01 20:29:49 +00:00
|
|
|
use CreatesApplication;
|
2017-06-25 00:49:09 +00:00
|
|
|
|
2017-10-08 04:29:08 +00:00
|
|
|
/**
|
|
|
|
* Setup tests.
|
|
|
|
*/
|
2017-06-25 00:49:09 +00:00
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
parent::setUp();
|
2017-10-08 04:29:08 +00:00
|
|
|
|
|
|
|
$this->setKnownUuidFactory();
|
|
|
|
}
|
|
|
|
|
2018-01-14 19:30:55 +00:00
|
|
|
/**
|
|
|
|
* Tear down tests.
|
|
|
|
*/
|
|
|
|
protected function tearDown()
|
|
|
|
{
|
|
|
|
parent::tearDown();
|
|
|
|
|
|
|
|
Chronos::setTestNow();
|
|
|
|
}
|
|
|
|
|
2017-10-08 04:29:08 +00: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-25 00:49:09 +00:00
|
|
|
}
|
2015-12-06 18:58:49 +00:00
|
|
|
}
|