Codeception for WordPress: Command init not defined - wordpress

I followed the steps here (http://codeception.com/for/wordpress) and successfully installed Codeception. But when I enter codecept init wpbrowser into the terminal to get started with Codeception for Wordpress, I get the error: Command init not defined. How can I correct this?

That's the correct command, but unfortunately, even the init command won't set everything up. It's very difficult to get CodeCeption to run the first time. At WordPress-BDD.com, we have a project going to get a WP dev server going with CodeCeption via one command. This will get WordPress CodeCeption going on a clean Ubuntu machine):
Setup WordPress CodeCeption in the cloud

Related

NextJS stuck at compiling

All of my next apps are getting stuck at event - compiled successfully when I try and run them using yarn dev. Everything from existing apps I've used before to brand new apps I literally make just for trying this fresh.
I've tried deleting node_modules and yarn.lock, running yarn again, then running yarn dev. No dice. I also updated node js to latest and tried a few iterations of the above, including some with a 'yarn build` step to see if that did anything. No luck.
Assuming it's some kind of machine config that got messed up, but I can't for the life of me figure out what it is. Ideas?
replace with it in package.json
“dev”: “next dev -p 1234",

PhpStorm + PHPUnit failures not displayed in Test Tab

I want to run tests in my applications in PhpStorm. Application is running on Symfony, for tests I am using PHPUnit and Symfony PHPUnit bridge.
Tests are running, but PhpStorm does not display any failure - it says: "All tests passed". In raw output is log of failure, so test failed (see screenshot), but PhpStorm did not show it.
Can anyone help me please?
Please follow the issue, Sebastian has changed line endings so we'll have to update our parser.
https://youtrack.jetbrains.com/issue/WI-42390
https://github.com/sebastianbergmann/phpunit/commit/56de7e9f96869a808fefc5a2fefbca7970ad2aab
I am using newest version of PHPStorm. I tried to downgrade from PHPUnit 7^ to PHPUnit 6^, after that downgrade it works perfectly. So I found temorary fix for this.

PhpStorm: error executing Behat tests No specifications found at path(s) but works from command line

I'm using PhpStorm and Vagrant to develop a Symfony project.
I configured PhpStorm to execute Behat tests with the Vagrant machine but when I try to run or debug them I got this error:
vagrant:///Users/jose/Documents/WWW/symfony_project/usr/bin/php /home/vagrant/.phpstorm_helpers/behat.php --format PhpStormBehatFormatter --config /var/www/symfony/behat.yml /var/www/symfony/features/api/brand/full_rest.feature:13
Testing started at 10:48 ...
0 scenario0 step0m0.05s (14.76Mb)
[Behat\Testwork\Tester\Exception\WrongPathsException]
No specifications found at path(s) `/var/www/symfony/features/api/brand/full_rest.feature:13`. This might be because of incorrect paths configuration in your `suites`.
Although if I execute it from the command line inside the Vagrant machine it works OK:
./vendor/bin/behat --config /var/www/symfony/behat.yml /var/www/symfony/features/api/brand/full_rest.feature:13
#brands #api
Feature: API to manage the brands
As a frontend app
.......
I've configured the PHP Interpreter with my Vagrant VM and I also think the Behat configuration is set OK: I see the Behat version, I've set the behat config path... I don't understand why the execution from PhpStorm fails.
Any ideas? Thanks in advance
This a bug in behat 3.4.0 breaks the ability to run individual tests
Try to switch back to "behat/behat": "3.3.1".

Composer scripts disregards Symfony console environment variable

I am facing an issue where the build process of my Symfony application fails, as explained in many different forums (none recent). For instance:
When doing composer install with --no-dev only the production packages
are installed (as it should be). However when composer launches the
symfony scripts they are launched in development modes and thus start
throwing errors when AppKernel.php can not find packages needed for
development. These scripts should also be executed in production mode!
Quote source
The above Github issue is closed, as it apparently can be fixed by setting the SYMFONY_ENV env variable to the environment of your choice: export SYMFONY_ENV=prod.
I have done that, and calling printenv correctly prints the variable. I can even call the Symfony console php bin/console manually. and it will launch in prod environment.
Success? Seemingly, but no... Calling composer install still forces all scripts to launch in dev environment. What gives?
The root cause appears to be the environment variable not being set globally, so whatever user the commands ended up running as, www-data via my deploy script, or root(as I called sudo composer?) from the console, did not have the environment variable set that I created with my default user.
Adding SYMFONY_ENV=prod on a new line in /etc/environment, and then restarting fixed the issue, and the scripts are now running in prod.

Running PHPUnit test in PhpStorm adds "--teamcity" option causing error

I have the latest PhpStorm (2016.2) and PHPUnit phar (5.5.4). For some reason when I run a PHPUnit test in my project in PhpStorm, it is adding on --teamcity to the run command, resulting in a failure:
Testing started at 12:52 PM ...
Unit test suite invoked with a path to a non-unit test: --teamcity
Process finished with exit code 1
I have no idea where this --teamcity option is coming from, it happens no matter what test I run, and even when starting from a blank configuration. I also do NOT have the TeamCity plugin installed, I don't even use TeamCity.
Here's what the full command appears as:
/usr/local/Cellar/php70/7.0.9/bin/php /Users/name/bin/phpunit-5.5.4.phar --configuration /path/to/config/my-phpunit.xml ClassNameTest /Users/name/PhpstormProjects/path/to/tests/unit/app/ClassNameTest.php --teamcity
(sensitive information swapped out)
All I want to do is get rid of this --teamcity option, everything works if I run in a separate terminal window without that option. This only recently started happening, maybe after a PhpStorm update.
tl;dr
I only could resolve this by removing the system installed phpunit instance from my system (Linux):
sudo apt remove phpunit-*
Details
Even if the setting in PhpStorm was to use composer autoloader:
for some reason it ended up using TeamCity from /usr/share/php/PHPUnit/Util/Log/TeamCity.php:
Project's local PHPUnit was 6.2 while the system default was 5.1 -> they're incompatible.
I spent half a day struggling with this. The underlying issue is switching between PHPUnit versions (6.x.x -> 4.x.x). (Happened to me by switching branches)
A click on the refresh button in the PHPUnit preferences fixes it.
(Languages & Frameworks > PHP > PHPUnit)
Make sure the version of PHPUnit it thinks you have matches the one it reports.
This --teamcity option is used by PHPStorm to output tests result.
What you're facing is an issue caused by PHP7 and an old version of PHPUnit.
Remove your PHPUnit 5 and install the latest one (currently 6.2) with composer and use PHPUnit namespaces instead.
More info on this bug: https://github.com/sebastianbergmann/phpunit/issues/2460
Problem was internal to the project. PHPUnit does not contain that error message. Sorry!

Resources