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

Refactor TestMakeCommand / add `--feature` flag #748

Merged
merged 3 commits into from Apr 11, 2019

Conversation

Projects
None yet
2 participants
@artemsky
Copy link
Contributor

artemsky commented Apr 6, 2019

  • Refactor unit-test stub to be consistent with Laravel 5.8
  • Add feature-test.stub
  • Change namespaces according to Laravel 5.8

WARNING - Changes current behavior

Before:

  • php artisan module:make-test EloquentPostRepositoryTest Blog created a test in Test namespace

Now:

  • php artisan module:make-test EloquentPostRepositoryTest Blog --feature create a test in Test\Feature namespace
  • php artisan module:make-test EloquentPostRepositoryTest Blog create a test in Test\Unit namespace

Docs update - nWidart/nwidart-docs#21

artemsky added a commit to artemsky/nwidart-docs that referenced this pull request Apr 6, 2019

@artemsky

This comment has been minimized.

Copy link
Contributor Author

artemsky commented Apr 6, 2019

In some reasons, can't run tests on my local env. I'll fix it in a few days

* Refactor `unit-test` stub to be consistent with Laravel 5.8
* Add `feature-test.stub`
* Change namespaces according to Laravel 5.8

### WARNING - Changes current behavior
**Before:**
* `php artisan module:make-test EloquentPostRepositoryTest Blog` created the test in `Test` namespace

**Now:**
* `php artisan module:make-test EloquentPostRepositoryTest Blog` created the test in `Test\Feature` namespace
* `php artisan module:make-test EloquentPostRepositoryTest Blog --unit` created the test in `Test\Unit` namespace

@artemsky artemsky force-pushed the artemsky:support/test branch from 1c95f98 to a8f11d1 Apr 7, 2019

@nWidart

This comment has been minimized.

Copy link
Owner

nWidart commented Apr 7, 2019

Hi and thank you for the contribution!

I think it would be better to make the unit test default and the feature one the additional flag.

Change `--unit` to `--feature`
Mark unit test as default

artemsky added a commit to artemsky/nwidart-docs that referenced this pull request Apr 7, 2019

Show resolved Hide resolved config/config.php Outdated

@artemsky artemsky changed the title Refactor TestMakeCommand / add `--unit` flag Refactor TestMakeCommand / add `--feature` flag Apr 8, 2019

@nWidart

This comment has been minimized.

Copy link
Owner

nWidart commented Apr 11, 2019

Thanks for the changes! 👍

@nWidart nWidart merged commit 04afa51 into nWidart:master Apr 11, 2019

2 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.