Skip to content

Commit e39ff85

Browse files
Fix tests
1 parent ddefd84 commit e39ff85

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.lando/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export PATH="$PATH:/app/drupal/vendor/bin"
1010
cd "/app/drupal"
1111

1212
set +e
13-
drush status bootstrap | grep -q Successful
13+
drush status | grep -q -e 'Drupal bootstrap *: *Successful'
1414
status="$?"
1515
set -e
1616
if [[ "$status" -ne 0 ]]; then

_ping.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ public function logErrors(array $payloads, string $severity): void {
320320
// is unable to handle JSON.
321321
$msg = str_replace(['{', '}'], ['((', '))'], $msg);
322322
\Drupal::logger('drupal_ping')->{$severity}($msg);
323-
} catch(\Exception $e) { }
323+
}
324+
catch (\Exception $e) {
325+
}
324326
};
325327
}
326328
elseif (!empty(getenv('SILTA_CLUSTER')) || !empty(getenv('LANDO'))) {

tests/AppTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public function testlogErrors(): void {
4141
$a->logErrors([
4242
['check1' => 'msg1'],
4343
['check2' => 'msg2'],
44-
]);
44+
], 'notice');
4545
$expected = [
46-
'ping: {"check1":"msg1"}',
47-
'ping: {"check2":"msg2"}',
46+
'{"check1":"msg1"}',
47+
'{"check2":"msg2"}',
4848
];
4949
$this->assertEquals($expected, $_logs);
5050
}

tests/MemcacheCheckerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testCheckErrorPort(): void {
108108
'error' => 'Connection refused',
109109
]],
110110
];
111-
$this->assertEquals(['error', $data], $status);
111+
$this->assertEquals(['warning', $data], $status);
112112
}
113113

114114
/**
@@ -133,7 +133,7 @@ public function testCheckErrorHost(): void {
133133
'error' => 'Cannot assign requested address',
134134
]],
135135
];
136-
$this->assertEquals(['error', $data], $status);
136+
$this->assertEquals(['warning', $data], $status);
137137
}
138138

139139
/**
@@ -227,7 +227,7 @@ public function testCheckErrorMulti(): void {
227227
],
228228
],
229229
];
230-
$this->assertEquals(['error', $data], $status);
230+
$this->assertEquals(['warning', $data], $status);
231231
}
232232

233233
}

0 commit comments

Comments
 (0)