public function testNotFound(): void
{ $e = AppException::
notFound('NonExistingApp'
);
static::
assertInstanceOf(AppNotFoundException::
class,
$e);
static::
assertEquals(AppException::NOT_FOUND,
$e->
getErrorCode());
} public function testAlreadyInstalled(): void
{ $e = AppException::
alreadyInstalled('AlreadyInstalledApp'
);
static::
assertInstanceOf(AppAlreadyInstalledException::
class,
$e);
static::
assertEquals(AppException::ALREADY_INSTALLED,
$e->
getErrorCode());
} public function testRegistrationFailed(): void
{ $e = AppException::
registrationFailed('ToBeRegisteredApp', 'Invalid signature'
);
static::
assertEquals(AppException::REGISTRATION_FAILED,
$e->
getErrorCode());
static::
assertEquals('App registration for "ToBeRegisteredApp" failed: Invalid signature',
$e->
getMessage());
}