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

[WIP] Atoum command #12

Merged
merged 3 commits into from
Feb 13, 2013
Merged

[WIP] Atoum command #12

merged 3 commits into from
Feb 13, 2013

Conversation

stephpy
Copy link
Member

@stephpy stephpy commented Jan 8, 2013

Work in progress implementation of atoum command. (discussion begin here #9)

$ app/console atoum FooBundle # FooBundle
$ app/console atoum FooBundle bar ...... #FooBundle and bundle which has `bar` as bundle alias extension.
$ app/console atoum # all bundles configured on config_test.yml

config_test.yml

atoum:
    bundles: [FooBundle, BarBundle]

foreach ($input->getArgument('bundles') as $name) {
$bundle = $this->extractBundleFromKernel($name);

$runner->addTestAllDirectory(sprintf('%s/Tests/Units', $bundle->getPath()));
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a Symfony convention ... we should may be tests for existance of tests/units or Tests/Units directory, or having this information on configuration too ...

Copy link
Member

Choose a reason for hiding this comment

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

I think we can use both :

  • If anything is configured, then we use those values
  • If nothing is configured, we fallback to conventions, correctly checking that directories exist before adding them (checks should also be run in the config. context)

@nmariani
Copy link

Maybe we could add support for Controller testing too by default ?

        $runner->addTestAllDirectory(sprintf('%s/Tests/Controller', $bundle->getPath()));

@stephpy
Copy link
Member Author

stephpy commented Jan 14, 2013

I guess it would be better to supports Tests/Units and Tests/Functionals by default.

For sure, these dirs could be overload via a configuration ...

@nmariani
Copy link

I suggested Tests/Controller because I followed Atoum documentation but I agree with you Tests/Functionals is coherent and explicit regarding Unit VS Functional testing.

@mageekguy what's your opinion ?

The PR is still in WIP but it looks good. Any chance to have it merged soon ? Maybe we could release it right now just to have SF command support and then improve it with config and fallback in a next PR ?

@nmariani
Copy link

Another reason for Tests/Controller : Symfony conventions

Functional tests are simple PHP files that typically live in the Tests/Controller directory of your bundle.

@stephpy
Copy link
Member Author

stephpy commented Jan 14, 2013

I see, imho we Should follow symfony convention.

I'll finish this feature this week.

Thanks,

Le 14 janv. 2013 à 19:18, "Nathanaël Mariani" [email protected] a
écrit :

Another reason for Tests/Controller : Symfony conventions

Functional tests are simple PHP files that typically live in the
Tests/Controller directory of your bundle.


Reply to this email directly or view it on
GitHubhttps://github.com//pull/12#issuecomment-12231801.

@nmariani
Copy link

Great! Thanks. I look forward to using it with a clean composer.json ;)

@ludofleury
Copy link
Contributor

Stick to Symfony since it's a bundle ! yay 👍

@stephpy
Copy link
Member Author

stephpy commented Feb 11, 2013

It could be merged, any thought on this PR ?

@jubianchi
Copy link
Member

No problem for me ;)

stephpy added a commit that referenced this pull request Feb 13, 2013
@stephpy stephpy merged commit e5b211e into atoum:master Feb 13, 2013
@stephpy stephpy deleted the command branch February 13, 2013 09:35
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.

4 participants