mirror of
https://github.com/friendica/friendica
synced 2025-04-25 06:30:11 +00:00
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
|
@ -31,7 +31,7 @@ class SyslogLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
private $logger;
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -86,8 +86,13 @@ class SyslogLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
public function testServerException()
|
||||
{
|
||||
$this->expectException(\UnexpectedValueException::class);
|
||||
$this->expectExceptionMessageRegExp("/Can\'t open syslog for ident \".*\" and facility \".*\": .* /");
|
||||
if (PHP_MAJOR_VERSION < 8) {
|
||||
$this->expectException(\UnexpectedValueException::class);
|
||||
$this->expectExceptionMessageRegExp("/Can\'t open syslog for ident \".*\" and facility \".*\": .* /");
|
||||
} else {
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->expectExceptionMessage("openlog(): Argument #3 (\$facility) must be of type int, string given");
|
||||
}
|
||||
|
||||
$logger = new SyslogLoggerWrapper('test', $this->introspection, LogLevel::DEBUG, null, 'a string');
|
||||
$logger->emergency('not working');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue