Skip to content

Commit

Permalink
test: fix exception matching
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Aug 12, 2024
1 parent a18ec04 commit 98dcef3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/ICAP/ICAPClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
class ICAPClientTest extends TestCase {
public function testConnect_ShouldThrowRuntimeException() {
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('Cannot connect to "tcp://nothinghere:8080": php_network_getaddresses: getaddrinfo for nothinghere failed: Name or service not known (code 0)');
$this->expectExceptionMessageMatches('/Cannot connect to "tcp\:\/\/nothinghere\:8080"\: .*/');
$icapClient = new ICAPClient("nothinghere", 8080, 2);
$icapClient->respmod("myservice", [], [], []);
$icapClient->respmod("myservice", [], [], []);
}
}
2 changes: 1 addition & 1 deletion tests/StatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace OCA\Files_Antivirus\Tests;

use \OCA\Files_Antivirus\Db\RuleMapper;
use OCA\Files_Antivirus\Db\RuleMapper;
use Psr\Log\LoggerInterface;

/**
Expand Down

0 comments on commit 98dcef3

Please sign in to comment.