Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://git.zendframework.com/zf
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/RSATest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,20 @@ public function testSetCertificatePathLoadsCertificateString()

public function testConstructorSetsHashOption()
{
$rsa = new RSA(array('hashAlgorithm'=>'md2'));
$this->assertEquals(OPENSSL_ALGO_MD2, $rsa->getHashAlgorithm());
$rsa = new RSA(array('hashAlgorithm'=>'md5'));
$this->assertEquals(OPENSSL_ALGO_MD5, $rsa->getHashAlgorithm());
}

public function testSetPemStringParsesPemForPrivateKey()
{
$rsa = new RSA(array('pemString'=>$this->_testPemString));
$this->assertType('Zend\\Crypt\\RSA\\PrivateKey', $rsa->getPrivateKey());
$this->assertInstanceOf('Zend\\Crypt\\RSA\\PrivateKey', $rsa->getPrivateKey());
}

public function testSetPemStringParsesPemForPublicKey()
{
$rsa = new RSA(array('pemString'=>$this->_testPemString));
$this->assertType('Zend\\Crypt\\RSA\\PublicKey', $rsa->getPublicKey());
$this->assertInstanceOf('Zend\\Crypt\\RSA\\PublicKey', $rsa->getPublicKey());
}

public function testSetCertificateStringParsesCertificateForNullPrivateKey()
Expand All @@ -153,7 +153,7 @@ public function testSetCertificateStringParsesCertificateForNullPrivateKey()
public function testSetCertificateStringParsesCertificateForPublicKey()
{
$rsa = new RSA(array('certificateString'=>$this->_testCertificateString));
$this->assertType('Zend\\Crypt\\RSA\\PublicKey', $rsa->getPublicKey());
$this->assertInstanceOf('Zend\\Crypt\\RSA\\PublicKey', $rsa->getPublicKey());
}

public function testSignGeneratesExpectedBinarySignature()
Expand Down Expand Up @@ -264,21 +264,21 @@ public function testKeyGenerationCreatesArrayObjectResult()
{
$rsa = new RSA;
$keys = $rsa->generateKeys(array('private_key_bits'=>512));
$this->assertType('ArrayObject', $keys);
$this->assertInstanceOf('ArrayObject', $keys);
}

public function testKeyGenerationCreatesPrivateKeyInArrayObject()
{
$rsa = new RSA;
$keys = $rsa->generateKeys(array('private_key_bits'=>512));
$this->assertType('Zend\\Crypt\\RSA\\PrivateKey', $keys->privateKey);
$this->assertInstanceOf('Zend\\Crypt\\RSA\\PrivateKey', $keys->privateKey);
}

public function testKeyGenerationCreatesPublicKeyInArrayObject()
{
$rsa = new RSA;
$keys = $rsa->generateKeys(array('privateKeyBits'=>512));
$this->assertType('Zend\\Crypt\\RSA\\PublicKey', $keys->publicKey);
$this->assertInstanceOf('Zend\\Crypt\\RSA\\PublicKey', $keys->publicKey);
}

public function testKeyGenerationCreatesPassphrasedPrivateKey()
Expand Down

0 comments on commit a22edeb

Please sign in to comment.