getAccountImage(999)); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testAccountImageUrl() : void { $media = new Media(); $media->createdBy = new NullAccount(1); $media->description = 'desc'; $media->setPath('Web/Backend/img/default-user.jpg'); $media->size = 11; $media->extension = 'png'; $media->name = 'Image'; if (($profile = ProfileMapper::get()->where('account', 1)->execute())->id === 0) { $profile = new Profile(); $profile->account = AccountMapper::get()->where('id', 1)->execute(); $profile->image = $media; $profile->birthday = new \DateTime('now'); $id = ProfileMapper::create()->execute($profile); self::assertGreaterThan(0, $profile->id); self::assertEquals($id, $profile->id); } else { $profile->image = $media; $profile->birthday = new \DateTime('now'); ProfileMapper::update()->with('image')->execute($profile); } $view = new TaskView(); self::assertEquals('Web/Backend/img/default-user.jpg', $view->getAccountImage(1)); } }