Skip to content

Update tests for PHPUnit 5.5 - #438

Merged
cursedcoder merged 1 commit into
KnpLabs:masterfrom
MartinPeverelli:update_tests_for_phpunit55
Oct 14, 2016
Merged

cursedcoder merged 1 commit into
KnpLabs:masterfrom
MartinPeverelli:update_tests_for_phpunit55

Conversation

@MartinPeverelli

Copy link
Copy Markdown
Contributor

No description provided.

@Nyholm Nyholm left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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. :(

$method = 'bar';
$parameters = array('baz');
$api = $this->getMock('Github\Api\ApiInterface');
$api = $this->createMock('Github\Api\ApiInterface');

@kokspflanze kokspflanze Sep 28, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

👎

@Nyholm

Nyholm commented Oct 11, 2016

Copy link
Copy Markdown
Collaborator

@GrahamCampbell Could you elaborate your comment?

@GrahamCampbell

Copy link
Copy Markdown
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