Skip to content

Commit ac8db9d

Browse files
committed
don't print "Caught expected exception" but assert instead
1 parent 6c9ac6b commit ac8db9d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tests/AqlUserFunctionTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,14 @@ public function testRegisterListAndUnRegisterAqlUserFunctionWithGettersAndSetter
169169
);
170170

171171
// Check giving the set method a non-string key
172+
$caught = false;
172173
try {
173174
$userFunction->set(1, 1);
174175
} catch (ClientException $e) {
175-
echo 'Caught expected exception';
176+
$caught = true;
176177
}
178+
179+
static::assertTrue($caught);
177180

178181

179182
$result = $userFunction->register();

tests/BatchTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,15 @@ public function testCreateDocumentBatchWithDefinedBatchSize()
208208
$batch->stopCapture();
209209

210210
// Check giving the set method a non-string key
211+
$caught = false;
211212
try {
212213
$batch->stopCapture();
213214
} catch (ClientException $e) {
214-
echo 'Caught expected exception';
215+
$caught = true;
215216
}
216217

218+
static::assertTrue($caught);
219+
217220

218221
$batch->process();
219222

0 commit comments

Comments
 (0)