Skip to content

Commit 137626f

Browse files
author
Paul Bearne
committed
Align array key spacing in iis7RewriteRuleExists() test data for consistency
1 parent 29d33fd commit 137626f

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tests/phpunit/tests/admin/includes/misc/iis7RewriteRuleExists.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public function tear_down() {
4747
public function test_iis7_rewrite_rule_exists( $expected, $content ) {
4848
if ( 'Not XML' === $content ) {
4949
file_put_contents( $this->temp_file, $content );
50-
$this->assertSame( $expected, iis7_rewrite_rule_exists( $this->temp_file ) );
50+
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
51+
$this->assertSame( $expected, @iis7_rewrite_rule_exists( $this->temp_file ) );
5152
} else {
5253
file_put_contents( $this->temp_file, $content );
5354
$this->assertSame( $expected, iis7_rewrite_rule_exists( $this->temp_file ) );
@@ -65,23 +66,23 @@ public function data_iis7_rewrite_rule_exists(): array {
6566
'expected' => true,
6667
'content' => '<configuration><system.webServer><rewrite><rules><rule name="wordpress-rules" /></rules></rewrite></system.webServer></configuration>',
6768
),
68-
'Rule with name "wordpress" exists' => array(
69+
'Rule with name "wordpress" exists' => array(
6970
'expected' => true,
7071
'content' => '<configuration><system.webServer><rewrite><rules><rule name="wordpress" /></rules></rewrite></system.webServer></configuration>',
7172
),
72-
'Rule with name "WordPress" exists' => array(
73+
'Rule with name "WordPress" exists' => array(
7374
'expected' => true,
7475
'content' => '<configuration><system.webServer><rewrite><rules><rule name="WordPress" /></rules></rewrite></system.webServer></configuration>',
7576
),
76-
'Rule does not exist' => array(
77+
'Rule does not exist' => array(
7778
'expected' => false,
7879
'content' => '<configuration><system.webServer><rewrite><rules><rule name="other-rule" /></rules></rewrite></system.webServer></configuration>',
7980
),
80-
'Empty configuration' => array(
81+
'Empty configuration' => array(
8182
'expected' => false,
8283
'content' => '<configuration />',
8384
),
84-
'Invalid XML' => array(
85+
'Invalid XML' => array(
8586
'expected' => false,
8687
'content' => 'Not XML',
8788
),

0 commit comments

Comments
 (0)