-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
memory-package-test-refactor: refactored the memory package test and cleaned up some docblock comments #23
memory-package-test-refactor: refactored the memory package test and cleaned up some docblock comments #23
Conversation
…e a bit more DRY and "hopefully" re-usable in anticipation of more package types being adding in the future.
@@ -5,6 +5,7 @@ | |||
* | |||
* (c) Nils Adermann <naderman@naderman.de> | |||
* Jordi Boggiano <j.boggiano@seld.be> | |||
* Wil Moore III <wil.moore@wilmoore.com> |
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.
you should not add your name in the license header but in the @author
annotation
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.
Also test classes typically don't have author annotations
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.
Fair enough...dropping my name from the header -- not adding @author since it isn't there in any of the other test classes.
We use camel case for method names everywhere, please adjust the test methods, and prefix them with test, so you can remove the @test annotation too. Even dox output should be able to cope with As for your todo entry, yes, all packages should follow the same semantics so they could be tested together, but we only have the MemoryPackage atm, and I honestly don't know if we'll ever have another package implementation in core. |
All updated. |
* | ||
* demonstrates several versioning schemes | ||
*/ | ||
public function ProviderVersioningSchemes() |
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.
This method should be lowercase too.
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.
fair enough.
* | ||
* demonstrates several versioning schemes | ||
*/ | ||
public function providerversioningschemes() |
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.
Sorry to be so anal about all this, but what he meant by lowercase, was only that method names should be camelCased with first letter lower cased, now completely lowercased à la imagecreatefromjpeg()
, which is kind of unreadable :)
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.
No worries. That was quickly correctable.
…schemes -> providerVersioningSchemes)
Merged, thanks |
End Result:
$ phpunit --testdox --filter MemoryPackageTest
PHPUnit 3.5.15 by Sebastian Bergmann.
Composer\Test\Package\MemoryPackage
[x] Memory Package Has Expected Naming Semantics
[x] Memory Package Has Expected Versioning Semantics
[x] Memory Package Has Expected Marshalling Semantics