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

Added verbose option in configuration file #1226

Merged
merged 3 commits into from Oct 29, 2018

Conversation

DonCallisto
Copy link
Contributor

Issue/Feature #1202

Let's discuss it if something is not clear.

Copy link
Member

@ciaranmcnulty ciaranmcnulty left a comment

Choose a reason for hiding this comment

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

Can you also add a scenario where we have verbosity turned off in the config, and PhpSpec is run with -v?


.. code-block:: yaml

verbose: true
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to reserve the option to use the higher verbosity levels for something in future rather than just a boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you mean that accepted value should be vvv (or 3 that's debug value)? Is not counterintuitive? I mean, if I use vvv or whatever I would expect that also other levels are handled so I would try with v and vv.
WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah boolean's probably fine for now then


namespace Verbose\SpecExample1;

class ConfigVerbosityConsoleNotSetted
Copy link
Member

Choose a reason for hiding this comment

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

-NotSet please


"""
When I run phpspec
Then Output should contains:
Copy link
Member

Choose a reason for hiding this comment

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

The the output should contain: please

@DonCallisto
Copy link
Contributor Author

@ciaranmcnulty I've fix all you asked for in a separate commit, in order to let the review be easier.
Just one thing: CI is broken. I've tried onto my laptop and if I run single behat test (so if I specify feature file) test will pass, otherwise it won't. I really don't know if, maybe?, behat w/o single feature file runs with any command options (like verbosity?).

@DonCallisto
Copy link
Contributor Author

DonCallisto commented Oct 28, 2018

@ciaranmcnulty your intuition (from our Slack converstation) was good. Take a look to last commit, it should fix it the right way.
BTW we still have an unresolved conversation above, please check it out, thanks!

@@ -76,6 +78,11 @@ private function setupReRunner()
$this->application->getContainer()->set('process.rerunner.platformspecific', $this->reRunner);
}

private function resetShellVerbosity()
{
putenv(sprintf('SHELL_VERBOSITY=%d', OutputInterface::VERBOSITY_NORMAL));
Copy link
Member

Choose a reason for hiding this comment

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

Is there not a way to reset the ApplicationTester instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DonCallisto
Copy link
Contributor Author

@ciaranmcnulty travis is green 🎉

@ciaranmcnulty ciaranmcnulty merged commit 701420a into phpspec:master Oct 29, 2018
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.

None yet

2 participants