welaika / wp-cli-db2utf8

wp-cli command to downgrade db encoding of new WP installation to UTF8
MIT License
10 stars 1 forks source link

Consider adding functional tests to this project #2

Closed danielbachhuber closed 8 years ago

danielbachhuber commented 8 years ago

Functional tests are an integral ingredient of highly-quality, maintainable commands. WP-CLI tries to make it as easy as possible to add functional tests to your package with its wp scaffold package-tests command:

https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-tests

I'd encourage you to consider adding functional tests to your package :) By starting your functional tests early on, it also makes it much easier to maintain your project over time.

alessandro-fazzi commented 8 years ago

We love tests and I'll consider to learn a bit of behat as soon as I can.

alessandro-fazzi commented 8 years ago

@danielbachhuber ever seen those warnings:

0.22s$ composer validate --strict
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
require.wp-cli/wp-cli : unbound version constraints (>=0.23.0) should be avoided
The command "composer validate --strict" failed and exited with 1 during .
Your build has been stopped.

??

danielbachhuber commented 8 years ago

Yep, see history of https://github.com/wp-cli/scaffold-package-command/pull/56

alessandro-fazzi commented 8 years ago

I have one last question. I've gitignored following

composer.lock
composer.phar
installer

just because all seems to work without them. But i can't find what the best practice is, said that the scaffolded .gitignore was not ignoring them. Where could I find documentation about what and why check into the repo?

danielbachhuber commented 8 years ago

But i can't find what the best practice is, said that the scaffolded .gitignore was not ignoring them. Where could I find documentation about what and why check into the repo?

There isn't documentation about these specifically.

composer.lock is something you should commit to your project, because it locks new installations of your project to specific dependency versions.

composer.phar and installer aren't necessary in the installation step because composer is pre-installed on Travis, CircleCI, and other CI systems. I've created an issue to remove it https://github.com/wp-cli/scaffold-package-command/issues/59

alessandro-fazzi commented 8 years ago

Thanks for help and for all the fish :)