mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
tests: Use minimal channel for LDSignature tests
Move the channel keypair and other fields needed by the
LDSignature::verify function to the test case itself. This makes the
test case independent on any potential future changes to the fixtures.
(cherry picked from commit 8d283e0be5)
Co-authored-by: Harald Eilertsen <haraldei@anduin.net>
This commit is contained in:
@@ -15,7 +15,27 @@ use Zotlabs\Tests\Unit\UnitTestCase;
|
|||||||
class LDSignaturesTest extends UnitTestCase {
|
class LDSignaturesTest extends UnitTestCase {
|
||||||
|
|
||||||
public function testVerifyLDSignature(): void {
|
public function testVerifyLDSignature(): void {
|
||||||
$channel = $this->fixtures['channel'][1];
|
$channel = [
|
||||||
|
'channel_address' => 'test',
|
||||||
|
'channel_prvkey' => <<<'EOD'
|
||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEAvUNHsxNNL8egKxBl
|
||||||
|
rQdhdKz7N1DfJ8yMAYGPizta9uZ9uoe2qbgYpFPP41gbWvCJqDptmRCWXVZnmH6E
|
||||||
|
Pe6pLwIDAQABAkBtvgJoKsv55YXREqvyPbJbxiXQuFr9J9US1n5WXG9tc8+S1SB3
|
||||||
|
Azh7GtORAVnFkba5Ruj/Qij+CLe1ggCkwu0pAiEA41HXbZzQbb4hOxB9mkVvlMYj
|
||||||
|
r8UqOEtbvKEpnCUAeLUCIQDVJD8BnuCLKRxdtJRbWjwSe++/czwCTVTFv+XIyXX8
|
||||||
|
0wIgMx6qhZnoPWWub2vr8w9+YkSUreh28CXyQV80zkp76qkCIQCA1X34Ps6/j0QE
|
||||||
|
KCkc5vg0vBF5CfCV+6RoO8xrh8r33QIhANFLEX+THSmi6s+/d3rUHRqj7cTzJdHh
|
||||||
|
31v2ixfbFhB6
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
|
EOD,
|
||||||
|
'channel_pubkey' => <<<'EOD'
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL1DR7MTTS/HoCsQZa0HYXSs+zdQ3yfM
|
||||||
|
jAGBj4s7WvbmfbqHtqm4GKRTz+NYG1rwiag6bZkQll1WZ5h+hD3uqS8CAwEAAQ==
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
|
EOD,
|
||||||
|
];
|
||||||
|
|
||||||
$activity = [
|
$activity = [
|
||||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
|
|||||||
Reference in New Issue
Block a user