Skip to content

Update tests for PHPUnit 5.5 #438

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

Merged
merged 1 commit into from
Oct 14, 2016
Merged

Update tests for PHPUnit 5.5 #438

merged 1 commit into from
Oct 14, 2016

Conversation

MartinPeverelli
Copy link
Contributor

No description provided.

Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

I like this PR. But as you see from Travis we can't drop support for phpunit 4. Please allow both versions in composer.json

@MartinPeverelli
Copy link
Contributor Author

@Nyholm I updated the PR, but it seems to me that the TravisCI error is due to the minimum stability setting and the dependencies. :(

@@ -97,9 +101,12 @@ public function testFetch()
$result = 'foo';
$method = 'bar';
$parameters = array('baz');
$api = $this->getMock('Github\Api\ApiInterface');
$api = $this->createMock('Github\Api\ApiInterface');
Copy link
Contributor

@kokspflanze kokspflanze Sep 28, 2016

Choose a reason for hiding this comment

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

createMock was added in PHPUnit 5.4 and PHPUnit 5.X is min PHP 5.6

https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-5.4.0#new-features

Copy link
Contributor

Choose a reason for hiding this comment

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

You can use getMockBuilder() instead which works on all supported PHPUnit versions without triggering deprecations.

@GrahamCampbell
Copy link
Contributor

👎

@Nyholm
Copy link
Collaborator

Nyholm commented Oct 11, 2016

@GrahamCampbell Could you elaborate your comment?

@GrahamCampbell
Copy link
Contributor

My comment was basically because of:

createMock was added in PHPUnit 5.4 and PHPUnit 5.X is min PHP 5.6

However, if the solution:

You can use getMockBuilder() instead

is implemented instead, then 👍.

@cursedcoder cursedcoder merged commit 2ac1771 into KnpLabs:master Oct 14, 2016
@kokspflanze kokspflanze mentioned this pull request Oct 15, 2016
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.

6 participants