Skip to content

Conversation

@odain-cbd
Copy link

to speed up Combodo PR merge, i propose a test enhancement.

Copy link
Member

@Hipska Hipska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost didn't notice this PR. Please mention it on the main PR (Combodo#58) next time.

$this->assertFalse(Utils::CheckModuleInstallation('fake-module', false, $oRestClient));

$this->expectExceptionMessage('Required iTop module fake-module is considered as not installed due to: Found: 0');
$this->assertFalse(Utils::CheckModuleInstallation('fake-module', true, $oRestClient));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this assert succeed given it will throw an exception?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my guess is that 'assertFalse' is useless. it will not fail as i will not be reached.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea as well, so it could have been replaced with this:

Suggested change
$this->assertFalse(Utils::CheckModuleInstallation('fake-module', true, $oRestClient));
Utils::CheckModuleInstallation('fake-module', true, $oRestClient);

@Hipska Hipska merged commit 8ecafe5 into Super-Visions:feature/get_module_version Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants