summaryrefslogtreecommitdiff
path: root/wrappers/php/tests/DiscoveryTest.php
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2022-01-24 14:59:25 +0100
committerStevenWdV <stevenwdv@gmail.com>2022-01-24 16:24:57 +0100
commite544c6fa9e15e7277da79e2464243e90b2706b8c (patch)
treede6613747e0e34a799089d4677f9833a85748712 /wrappers/php/tests/DiscoveryTest.php
parentaab2e4b966c82b67eb0e204060e5ea6cd4ea15cf (diff)
Cleanup
Added variables to Makefiles to specify custom exports/ directory; Split exception classes in Java & C#; Added more comments; Renamed library and Go package; Removed real (pure) tests; Added generate_lib.ps1 to generate import .lib for Windows (Swift); Moved built Go libraries to exports/lib/; Switch to hopefully faster Swift GitHub Action.
Diffstat (limited to 'wrappers/php/tests/DiscoveryTest.php')
-rw-r--r--wrappers/php/tests/DiscoveryTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/wrappers/php/tests/DiscoveryTest.php b/wrappers/php/tests/DiscoveryTest.php
index 25ac187..fdce505 100644
--- a/wrappers/php/tests/DiscoveryTest.php
+++ b/wrappers/php/tests/DiscoveryTest.php
@@ -13,31 +13,31 @@ class DiscoveryTest extends TestCase
public static function setUpBeforeClass(): void
{
- preg_match('/[\r\n](\S+)\s*/', file_get_contents(self::TEST_DATA_DIR . '/dummy/public.key'), $matches);
+ preg_match('/[\r\n](\S+)\s*/', file_get_contents(self::TEST_DATA_DIR . '/public.key'), $matches);
Discovery::insecureTestingSetExtraKey($matches[1]);
}
public function testValid(): void
{
$this->expectNotToPerformAssertions();
- Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json.minisig'),
- file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json'),
+ Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.minisig'),
+ file_get_contents(self::TEST_DATA_DIR . '/server_list.json'),
'server_list.json', 0);
}
public function testInvalidSignature(): void
{
$this->expectException(InvalidSignatureException::class);
- Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/dummy/random.txt'),
- file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json'),
+ Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/random.txt'),
+ file_get_contents(self::TEST_DATA_DIR . '/server_list.json'),
'server_list.json', 0);
}
public function testWrongKey(): void
{
$this->expectException(InvalidSignatureUnknownKeyException::class);
- Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json.wrong_key.minisig'),
- file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json'),
+ Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.wrong_key.minisig'),
+ file_get_contents(self::TEST_DATA_DIR . '/server_list.json'),
'server_list.json', 0);
}
@@ -45,16 +45,16 @@ class DiscoveryTest extends TestCase
public function testOldSignature(): void
{
$this->expectException(SignatureTooOldException::class);
- Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json.minisig'),
- file_get_contents(self::TEST_DATA_DIR . '/dummy/server_list.json'),
+ Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/server_list.json.minisig'),
+ file_get_contents(self::TEST_DATA_DIR . '/server_list.json'),
'server_list.json', 1 << 31);
}
public function testUnknownExpectedFileName(): void
{
$this->expectException(InvalidArgumentException::class);
- Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/dummy/other_list.json.minisig'),
- file_get_contents(self::TEST_DATA_DIR . '/dummy/other_list.json'),
+ Discovery::verify(file_get_contents(self::TEST_DATA_DIR . '/other_list.json.minisig'),
+ file_get_contents(self::TEST_DATA_DIR . '/other_list.json'),
'other_list.json', 0);
}
}