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

API phpunit9 support #409

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz force-pushed the pulls/3/sapphire-test-nine branch 8 times, most recently from 50d4474 to cfcab57 Compare October 19, 2021 01:05
@emteknetnz emteknetnz force-pushed the pulls/3/sapphire-test-nine branch 7 times, most recently from 9e2410c to cd1912a Compare October 22, 2021 05:19
@emteknetnz emteknetnz marked this pull request as ready for review October 22, 2021 08:32
composer.json Outdated
@@ -17,8 +17,7 @@
"dnadesign/silverstripe-elemental": "<4.6"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"sminnee/phpunit-mock-objects": "^3.4.5",
"phpunit/phpunit": "^9",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"phpunit/phpunit": "^9",
"phpunit/phpunit": "^9.5",

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

tests/ControllerTest.php Show resolved Hide resolved
@@ -268,7 +269,11 @@ public function testExtractKeys()
$result = StaticSchema::inst()->extractKeys(['Foo', 'NotExists'], $arr);
$this->assertEquals(['test1', null], $result);

$this->expectException(\PHPUnit_Framework_Error::class);
if (PHP_VERSION_ID < 80000) {
$this->expectNotice();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectNotice();
$this->expectNotice('StaticSchema throws notice when extracting on non-existent key on PHP 7');

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

if (PHP_VERSION_ID < 80000) {
$this->expectNotice();
} else {
$this->expectWarning();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$this->expectWarning();
$this->expectWarning('StaticSchema throws warning when extracting on non-existent key on PHP 8');

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

I think you forgot to push your changes #409

@emteknetnz emteknetnz force-pushed the pulls/3/sapphire-test-nine branch from cd1912a to 55b598d Compare November 1, 2021 03:22
Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

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

LGTM

@maxime-rainville maxime-rainville merged commit 930fa51 into silverstripe:3 Nov 1, 2021
@maxime-rainville maxime-rainville deleted the pulls/3/sapphire-test-nine branch November 1, 2021 09:53
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.

2 participants