activitypub-php/test/RsaKeypairTest.php

17 lines
436 B
PHP
Raw Normal View History

2018-12-18 13:14:26 +00:00
<?php
namespace ActivityPub\Test;
use ActivityPub\Crypto\RsaKeypair;
use PHPUnit\Framework\TestCase;
class RsaKeypairTest extends TestCase
{
public function testItCreatesKeypair()
{
$keypair = RsaKeypair::generate();
$this->assertStringStartsWith( '-----BEGIN PUBLIC KEY-----', $keypair->getPublicKey() );
$this->assertStringEndsWith( '-----END PUBLIC KEY-----', $keypair->getPublicKey() );
}
}
?>