[COMPONENT][Group][TESTS] Fix Entity/GroupTest

This commit is contained in:
Diogo Peralta Cordeiro 2022-03-08 01:50:24 +00:00
parent cac68a6372
commit 0441f030ab
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0

View File

@ -19,10 +19,12 @@ declare(strict_types = 1);
// along with GNU social. If not, see <http://www.gnu.org/licenses/>. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
// }}} // }}}
namespace App\Tests\Entity; namespace Component\Group\tests\Entity;
use App\Core\DB\DB; use App\Core\DB\DB;
use App\Entity\Actor;
use App\Util\GNUsocialTestCase; use App\Util\GNUsocialTestCase;
use Component\Group\Entity\LocalGroup;
use Jchook\AssertThrows\AssertThrows; use Jchook\AssertThrows\AssertThrows;
class GroupTest extends GNUsocialTestCase class GroupTest extends GNUsocialTestCase
@ -31,8 +33,8 @@ class GroupTest extends GNUsocialTestCase
public function testGetActor() public function testGetActor()
{ {
$group = DB::findOneBy('local_group', ['nickname' => 'taken_group']); $group = DB::findOneBy(LocalGroup::class, ['nickname' => 'taken_public_group']);
$actor = DB::findOneBy('actor', ['nickname' => 'taken_group']); $actor = DB::findOneBy(Actor::class, ['nickname' => 'taken_public_group']);
static::assertSame($actor, $group->getActor()); static::assertObjectEquals($actor, $group->getActor());
} }
} }