Core/tests/libraries/encryption/mock_encryption.php
Abel Hoogeveen 5df6b733d0 Implemented many unit tests.
The following tests for classes have been implemented:
- Security
- Input
- Encryption Library
- Utf8

A mocking autoloader has been added (but is not yet configured correctly)
2016-06-02 23:57:23 +02:00

41 lines
793 B
PHP

<?php
use FuzeWorks\Library\FW_Encryption;
class Mock_Libraries_Encryption extends FW_Encryption {
/**
* __get_params()
*
* Allows public calls to the otherwise protected _get_params().
*/
public function __get_params($params)
{
return $this->_get_params($params);
}
// --------------------------------------------------------------------
/**
* get_key()
*
* Allows checking for key changes.
*/
public function get_key()
{
return $this->_key;
}
// --------------------------------------------------------------------
/**
* __driver_get_handle()
*
* Allows checking for _mcrypt_get_handle(), _openssl_get_handle()
*/
public function __driver_get_handle($driver, $cipher, $mode)
{
return $this->{'_'.$driver.'_get_handle'}($cipher, $mode);
}
}