Fix tests
- Fix InstallerTest case - Fix native function mocking - Add returntype for Unit-Tests - Fixing ExtendedPDO test troubles - Fix wrong class inheritance path for DatabaseTestTrait.php - Fix SyslogLogger Server Exception for PHP8 - Add user/contact to database.fixture.php - Avoid invalid rollbacks for test setup in PHP8
This commit is contained in:
parent
8cab5edea9
commit
02e6dff6a0
53 changed files with 171 additions and 69 deletions
|
@ -28,7 +28,7 @@ use Friendica\Core\Cache\APCuCache;
|
|||
*/
|
||||
class APCuCacheTest extends MemoryCacheTest
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
if (!APCuCache::isAvailable()) {
|
||||
static::markTestSkipped('APCu is not available');
|
||||
|
@ -43,7 +43,7 @@ class APCuCacheTest extends MemoryCacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
|
|
|
@ -31,7 +31,7 @@ class ArrayCacheTest extends MemoryCacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
|
|
|
@ -81,7 +81,7 @@ abstract class CacheTest extends MockedTest
|
|||
|
||||
abstract protected function getInstance();
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
|
|
@ -36,10 +36,12 @@ class DatabaseCacheTest extends CacheTest
|
|||
use DatabaseTestTrait;
|
||||
use VFSTrait;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->setUpVfsDir();
|
||||
|
||||
$this->setUpDb();
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
|
@ -60,9 +62,12 @@ class DatabaseCacheTest extends CacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
|
||||
$this->tearDownDb();
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ class MemcacheCacheTest extends MemoryCacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
|
|
|
@ -55,7 +55,7 @@ class MemcachedCacheTest extends MemoryCacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
|
|
|
@ -31,7 +31,7 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
*/
|
||||
protected $instance;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class RedisCacheTest extends MemoryCacheTest
|
|||
return $this->cache;
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->cache->clear(false);
|
||||
parent::tearDown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue