Skip to content

Commit 854a935

Browse files
committed
Assert when exactly an exception is thrown.
1 parent 1d4f955 commit 854a935

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/src/NamespaceDirectoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ public function testWithRealpathRoot(): void {
9797

9898
$this->callAndAssertException(
9999
\RuntimeException::class,
100-
fn () => $this
100+
$this
101101
->nsdir(__DIR__ . '/non/existing/path', 'Acme\Zoo')
102-
->withRealpathRoot(),
102+
->withRealpathRoot(...),
103103
);
104104
}
105105

@@ -440,7 +440,7 @@ public function testGetIterator(): void {
440440
iterator_to_array($nsdir->getIterator()),
441441
);
442442
$bad_nsdir = $this->nsdir(__DIR__ . '/non/existing/subdir', 'Acme\Missing');
443-
$this->callAndAssertException(\RuntimeException::class, fn () => $bad_nsdir->getIterator()->valid());
443+
$this->callAndAssertException(\RuntimeException::class, $bad_nsdir->getIterator()->valid(...));
444444
}
445445

446446
public function testGetElements(): void {

0 commit comments

Comments
 (0)