Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving JComponentHelper::getComponent tests #6546

merged 2 commits into from Mar 24, 2015


Copy link

@Hackwar Hackwar commented Mar 22, 2015

This slightly improves the JComponentHelper::getComponent unittests. It should be noted, that anonymous components don't have an "id" attribute, which could be problematic and that the "enabled" attribute has a boolean value when it is an anonymous component, while it is an integer when it is a known component. Also, JComponentHelper::isInstalled() might return true, even though the component is not installed. (It returns an integer and does not filter for components)

$this->assertTrue($falsecomponent->enabled, 'The anonymous component has to be enabled by default if not strict');

$falsecomponent2 = JComponentHelper::getComponent('com_false', true);
$this->assertFalse($falsecomponent2->enabled, 'The anonymous component has to be disabled by default if strict');
Copy link

Choose a reason for hiding this comment

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

Can we split these up into 3 separate tests please?

One for com_content, one for the first instance of false component, one for the disabled by default state.

Thanks :)

Copy link


Copy link
Member Author

Hackwar commented Mar 24, 2015


wilsonge added a commit that referenced this pull request Mar 24, 2015
Improving JComponentHelper::getComponent tests
@wilsonge wilsonge merged commit 8d6d510 into joomla:staging Mar 24, 2015
@wilsonge wilsonge added this to the Joomla! 3.4.2 milestone Mar 26, 2015
@Hackwar Hackwar deleted the patch-50 branch January 6, 2016 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants