[TESTS] Fix tests

This commit is contained in:
2022-10-19 22:39:17 +01:00
parent 2fd46ca886
commit 053bc38792
12 changed files with 89 additions and 50 deletions

View File

@@ -25,9 +25,9 @@ namespace App\Test\Core;
use App\Core\DB;
use App\Entity\LocalUser;
use App\Util\Exception\BugFoundException;
use App\Util\GNUsocialTestCase;
use BadMethodCallException;
use InvalidArgumentException;
use Jchook\AssertThrows\AssertThrows;
class EntityTest extends GNUsocialTestCase
@@ -46,7 +46,7 @@ class EntityTest extends GNUsocialTestCase
{
$user = LocalUser::create(['nickname' => 'foo']);
static::assertSame('foo', $user->getNickname());
static::assertThrows(InvalidArgumentException::class, fn () => LocalUser::create(['non_existant_property' => 'bar']));
static::assertThrows(BugFoundException::class, fn () => LocalUser::create(['non_existant_property' => 'bar']));
}
public function testCreateOrUpdate()