-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Updated list commands #1458
base: develop
Are you sure you want to change the base?
Updated list commands #1458
Conversation
- add out and input
@cmuench would like to here your opinion on it. This interface should make it easier to write "list"-commands with different output (text, json, xml).
You dont have to care about the output, since everything all done in abstract::execute(). |
# Conflicts: # composer.lock
@cmuench i am blind. I dont see whre this error is comming from. Any ideas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the issue with the tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to reproduce the issue with the failing unit tests on my machine.
The problem is that several calls of the filter
method caus the issue.
If we split the findInstalledModulesAndFilterThem
method in serveral test cases it's working.
/**
* @test
*/
public function findInstalledModulesAndCount()
{
$this->getApplication()->initMagento();
$modules = new Modules();
self::assertCount(0, $modules);
$total = count($modules->findInstalledModules());
self::assertGreaterThan(10, $total);
}
public function findInsalledModulesAndFilterByCodepool()
{
$this->getApplication()->initMagento();
$modules = new Modules();
$total = count($modules->findInstalledModules());
$filtered = $modules->filterModules($this->filter('codepool', 'core'));
self::assertLessThan($total, count($filtered));
}
public function findInstalledModulesAndFilterByStatus()
{
$this->getApplication()->initMagento();
$modules = new Modules();
$total = count($modules->findInstalledModules());
$filtered = $modules->filterModules($this->filter('status', 'active'));
self::assertLessThan($total, count($filtered));
}
public function findInstalledModulesAndFilterByVendor()
{
$this->getApplication()->initMagento();
$modules = new Modules();
$total = count($modules->findInstalledModules());
$filtered = $modules->filterModules($this->filter('vendor', 'Mage_'));
self::assertLessThan($total, count($filtered));
}
```
# Conflicts: # composer.lock # src/N98/Magento/Command/Developer/EmailTemplate/UsageCommand.php # src/N98/Magento/Command/Script/Repository/ListCommand.php
WIP