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
merged 2 commits into from Mar 24, 2015

Conversation

Projects
None yet
4 participants
@Hackwar
Member

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');

This comment has been minimized.

@wilsonge

wilsonge Mar 23, 2015

Contributor

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 :)

@wilsonge

This comment has been minimized.

Contributor

wilsonge commented Mar 23, 2015

👍

@Hackwar

This comment has been minimized.

Member

Hackwar commented Mar 24, 2015

done

wilsonge added a commit that referenced this pull request Mar 24, 2015

Merge pull request #6546 from Hackwar/patch-50
Improving JComponentHelper::getComponent tests

@wilsonge wilsonge merged commit 8d6d510 into joomla:staging Mar 24, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wilsonge wilsonge added this to the Joomla! 3.4.2 milestone Mar 26, 2015

@Hackwar Hackwar deleted the Hackwar:patch-50 branch Jan 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment