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

Add removeCommand() and removeCommands() methods to API. #66

Merged
merged 4 commits into from
Nov 27, 2015
Merged

Add removeCommand() and removeCommands() methods to API. #66

merged 4 commits into from
Nov 27, 2015

Conversation

jonnywilliamson
Copy link
Contributor

Added new tests to verify the new methods.

Have also added other new tests in the new suggested format for naming. I have left the other test names alone just so we can see what both look like.

* @expectedException InvalidArgumentException
* @link https://phpunit.de/manual/3.7/en/appendixes.annotations.html#appendixes.annotations.dataProvider
*/
public function it_should_only_allow_a_string_as_the_api_token($type)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name ApiTest::it_should_only_allow_a_string_as_the_api_token is not in camel caps format

@irazasyed
Copy link
Owner

So nitpick seems to be doing its job and i was bombarded with email notifications :|

@jonnywilliamson
Copy link
Contributor Author

Well I'll update my snippet for tests to put a "public" visibility for each function.

As for camel case caps? Mmmm.

* @test
* @expectedException Telegram\Bot\Exceptions\TelegramSDKException
*/
public function it_should_throw_exception_if_supplied_command_class_does_not_exist()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name ApiTest::it_should_throw_exception_if_supplied_command_class_does_not_exist is not in camel caps format

@irazasyed
Copy link
Owner

Have to ignore camel case caps check, Let me check their docs.

@jonnywilliamson
Copy link
Contributor Author

@irazasyed How about adding the nitpick.json config file and bypassing the test directory?

Example here:
https://gist.github.com/adamwathan/bf382f05c575db4efb6c

@irazasyed
Copy link
Owner

@jonnywilliamson I just added but ignoring would completely ignore all the checks. Including like the visibility one (like it suggested) and other PSR2 violations.

irazasyed added a commit that referenced this pull request Nov 27, 2015
Add removeCommand() and removeCommands() methods to API.
@irazasyed irazasyed merged commit 641f391 into irazasyed:master Nov 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants