-
Notifications
You must be signed in to change notification settings - Fork 14
composer test is now more convenient to use #48
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
Conversation
…at capitalization for attribute names are retained. So the short form for New York is now NY instead of ny. test/model/Author, Book, and Venue now have those strtoupper() workarounds in getter/setter methods removed as it's done in Model.php
…rcased in Model.php in order to be case insensitive.
…at capitalization for attribute names are retained. So the short form for New York is now NY instead of ny. test/model/Author, Book, and Venue now have those strtoupper() workarounds in getter/setter methods removed as it's done in Model.php
…rcased in Model.php in order to be case insensitive.
# Conflicts: # lib/Model.php
…cord # Conflicts: # test/ActiveRecordTest.php # test/models/Book.php
…Disable it so that regression does not timeout.
…d#35: Authors table now has a column that is camel cased: firstName Added tests that demonstrate case insensitivity when accessing this firstName column
- Correct link to contributing.md
…vity() is enough.
…is working in Linux.
|
Aren't you kind of reinventing the wheel, here? Isn't a lot of this already possible using the composer test -- test/DateTimeTest.phpif you don't like typing the name of the folder or ".php", you can do this: composer test -- --filter DateTimeTestsingle test: |
|
You can still do that if you want after this commit: vendor/bin/phpunit --filter DateTimeTest::testSetIsoDatebut, this is more convenient: composer test dateTime setIsoDateIt's a few things less to type and it's easier to do progressively larger tests. In my dev cycle, I do: composer test dateTime setIsoDate
composer test dateTime
composer testIn the old way, you'd have to: composer test -- --filter DateTimeTest::testSetIsoDate
composer test -- --filter DateTimeTest
composer testWhich would you rather type? Which is easier for a new developer to learn, especially since running: composer testgives hints for: To run just the tests in test/CallbackTest.php, try: composer test callback
To run a specific test in test/DateTimeTest.php, try: composer test dateTime testSetIsoDateDiscoverability is important for new developers, and convenience, especially if it's optional to use, is useful for all developers. |
|
I dunno, I'm still not convinced. Developers already accustomed to using the standard phpunit API now have to learn yours, so I guess it's up for debate which is more convenient. And for what it's worth, I never use the CLI for tests; I use PHPStorm, and I can just right click on folders, test classes, or individual tests and choose "Run" or "Debug". If you really want to insist on it I guess we can merge this, but I think it would be more appropriate for you to develop this tool in its own composer package, and we can import it as a dependency once it's matured a bit. |
composer test -- test/DateTimeTest.php composer test -- --filter DateTimeTest composer test -- --filter DateTimeTest::testSetIsoDate now all work too
|
All these tests now work too: As well as: Merge and let future developers use whatever syntax they want to use? Developers can write personal Windows.bat files or shell files if they wish, but using |
|
I think I can live with that. Please fix the CI, and we'll move forward. |
| "ActiveRecord\\": "lib/" | ||
| } | ||
| }, | ||
| "autoload-dev": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nice, I was wondering what to do about that 👍
shmax
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
composer test now takes optional parameters
With no parameters
runs
With a file name
runs
Note the prepending of test/, the fix in capitalization, and appending Test.php
With a file name and filter
runs