-
Notifications
You must be signed in to change notification settings - Fork 2k
Update wp-env and some ETK PHP fixes #79266
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
Changes from all commits
1ae8166
8704d50
513ab48
f6f6472
dedef78
cb06bad
d2cff7a
78f488e
0157c91
edc148d
9a79167
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,3 +119,7 @@ yarn-json-output.json | |
|
|
||
| # Storybook | ||
| storybook-static | ||
|
|
||
| # PHPUnit cache | ||
| .phpunit.result.cache | ||
| .phpunit.cache | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ class Block_Patterns_From_Api_Test extends TestCase { | |
| /** | ||
| * Pre-test setup. | ||
| */ | ||
| public function setUp() { | ||
| public function setUp(): void { | ||
| parent::setUp(); | ||
| $this->pattern_mock_object = array( | ||
| 'ID' => '1', | ||
|
|
@@ -41,8 +41,9 @@ public function setUp() { | |
| 'source_url' => 'http;//test', | ||
| 'modified_date' => 'dd:mm:YY', | ||
| 'categories' => array( | ||
| array( | ||
| 'title' => 'test-category', | ||
| 'test_slug' => array( | ||
|
||
| 'title' => 'category title', | ||
| 'description' => 'category description', | ||
| ), | ||
| ), | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,17 @@ | ||
| <?xml version="1.0"?> | ||
| <phpunit | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| bootstrap="phpunit/bootstrap.php" | ||
| backupGlobals="false" | ||
| colors="true" | ||
| convertErrorsToExceptions="true" | ||
| convertNoticesToExceptions="true" | ||
| convertWarningsToExceptions="true" | ||
| > | ||
| <php> | ||
| <const name="WP_TESTS_MULTISITE" value="1" /> | ||
| </php> | ||
| <php> | ||
| <env name="WORDPRESS_TABLE_PREFIX" value="wptests_"/> | ||
| <const name="WP_TESTS_MULTISITE" value="1"/> | ||
| </php> | ||
| <testsuites> | ||
| <testsuite name="default"> | ||
| <directory suffix="-test.php">./phpunit/</directory> | ||
|
|
@@ -19,9 +22,6 @@ | |
| <testsuite name="help-center"> | ||
| <directory suffix="-test.php">./help-center/test/</directory> | ||
| </testsuite> | ||
| <testsuite name="tutorials"> | ||
| <directory suffix="-test.php">./tutorials/test/</directory> | ||
|
||
| </testsuite> | ||
| <testsuite name="wpcom-global-styles"> | ||
| <directory suffix="-test.php">./wpcom-global-styles/test/</directory> | ||
| </testsuite> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| { | ||
| "name": "automattic/wp-calypso", | ||
| "require": { | ||
| "wp-phpunit/wp-phpunit": "^5.4", | ||
| "automattic/jetpack-codesniffer": "^2.1" | ||
| }, | ||
| "config": { | ||
| "allow-plugins": { | ||
| "dealerdirect/phpcodesniffer-composer-installer": true | ||
| }, | ||
| "platform": { | ||
| "php": "8.2" | ||
| } | ||
| }, | ||
| "require-dev": { | ||
| "automattic/jetpack-codesniffer": "^2.1", | ||
| "phpunit/phpunit": "^9", | ||
|
||
| "yoast/phpunit-polyfills": "^1.0", | ||
| "phpcsstandards/phpcsextra": "^1.0" | ||
| } | ||
| } | ||
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.
PHP 8 does not allow you to access arrays directly if the index doesn't exist.