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
|
@ -29,7 +29,7 @@ use Friendica\Core\Lock\CacheLock;
|
|||
*/
|
||||
class APCuCacheLockTest extends LockTest
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
if (!APCuCache::isAvailable()) {
|
||||
static::markTestSkipped('APCu is not available');
|
||||
|
|
|
@ -38,10 +38,12 @@ class DatabaseLockDriverTest extends LockTest
|
|||
|
||||
protected $pid = 123;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->setUpVfsDir();
|
||||
|
||||
$this->setUpDb();
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
|
@ -60,4 +62,11 @@ class DatabaseLockDriverTest extends LockTest
|
|||
|
||||
return new DatabaseLock($dba, $this->pid);
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->tearDownDb();
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ abstract class LockTest extends MockedTest
|
|||
|
||||
abstract protected function getInstance();
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -46,7 +46,7 @@ abstract class LockTest extends MockedTest
|
|||
$this->instance->releaseAll(true);
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->instance->releaseAll(true);
|
||||
parent::tearDown();
|
||||
|
|
|
@ -32,7 +32,7 @@ use Mockery\MockInterface;
|
|||
|
||||
class SemaphoreLockTest extends LockTest
|
||||
{
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
/** @var MockInterface|Dice $dice */
|
||||
$dice = Mockery::mock(Dice::class)->makePartial();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue