public function test_Should_Create_ContainerWithTypeEasy()
 {
     ContainerHelper::setupContainer();
     ContainerHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_CONTAINER_TYPE_EASY, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     $container = ContainerHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     $this->assertEquals(Constants::VIRGIL_CONTAINER_TYPE_EASY, $container->containerType);
 }
 public function test_Should_Create_PrivateKey()
 {
     ContainerHelper::setupContainer();
     ContainerHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_CONTAINER_TYPE_NORMAL, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     PrivateKeyHelper::setupPrivateKey();
     PrivateKeyHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     $privateKey = PrivateKeyHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     $this->assertEquals(Constants::VIRGIL_PRIVATE_KEY, $privateKey->privateKey);
 }
 public function test_Should_Reset_ContainerPassword()
 {
     ContainerHelper::setupContainer();
     ContainerHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_CONTAINER_TYPE_NORMAL, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     ContainerHelper::reset(Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_CONTAINER_PASSWORD_NEW);
     ContainerHelper::persist(Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, MailinatorHelper::fetchMessage(Constants::VIRGIL_USER_DATA_VALUE3));
     $container = ContainerHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD_NEW);
     $this->assertEquals(Constants::VIRGIL_CONTAINER_TYPE_NORMAL, $container->containerType);
 }
 public function test_Should_Delete_Container()
 {
     ContainerHelper::setupContainer();
     ContainerHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_CONTAINER_TYPE_NORMAL, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     $container = ContainerHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     $this->assertEquals(Constants::VIRGIL_CONTAINER_TYPE_NORMAL, $container->containerType);
     ContainerHelper::delete(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     try {
         ContainerHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     } catch (WebException $ex) {
         $this->assertEquals(40002, $ex->getErrorCode());
     }
 }
 public function test_Should_Delete_PrivateKey()
 {
     ContainerHelper::setupContainer();
     ContainerHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_CONTAINER_TYPE_NORMAL, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     PrivateKeyHelper::setupPrivateKey();
     PrivateKeyHelper::create(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     $privateKey = PrivateKeyHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     $this->assertEquals(Constants::VIRGIL_PRIVATE_KEY, $privateKey->privateKey);
     PrivateKeyHelper::delete(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD, Constants::VIRGIL_PRIVATE_KEY);
     try {
         PrivateKeyHelper::get(Constants::VIRGIL_PUBLIC_KEY_ID, Constants::VIRGIL_USER_DATA_VALUE3, Constants::VIRGIL_CONTAINER_PASSWORD);
     } catch (WebException $ex) {
         $this->assertEquals(50002, $ex->getErrorCode());
     }
 }