Consider adding protected methods for this.
```php
protected function assertIsPublicKey($string)
{
    $rsa = new Crypt_RSA();
    $this->assertTrue($rsa->loadKey($string));
    $this->assertInternalType('string', $rsa->getPublicKey());
    $this->assertFalse($rsa->getPrivateKey());
}
protected function assertIsPrivateKey($string)
{
    $rsa = new Crypt_RSA();
    $this->assertTrue($rsa->loadKey($string));
    $this->assertInternalType('string', $rsa->getPublicKey());
    $this->assertInternalType('string', $rsa->getPrivateKey());
}
```