for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Guarded Authentication package.
*
* (c) Jafar Jabr <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Jafar\Bundle\GuardedAuthenticationBundle\Tests\Api\KeyLoader;
use Jafar\Bundle\GuardedAuthenticationBundle\Api\KeyLoader\OpenSSLKeyLoader;
/**
* Class OpenSSLKeyLoaderTest.
* @author Jafar Jabr <[email protected]>
class OpenSSLKeyLoaderTest extends AbstractTestKeyLoader
{
* {@inheritdoc}
public function setUp()
$keys_path = dirname(__FILE__).'\keys\\';
$this->keyLoader = new OpenSSLKeyLoader('anyPassphrase', $keys_path);
}
* @expectedException \RuntimeException
public function testLoadInvalidPublicKey()
touch('public.pem');
$this->keyLoader->loadKey('public');
public function testLoadInvalidPrivateKey()
touch('private.pem');
$this->keyLoader->loadKey('private');