diff --git a/tests/Subscribers/GdprSubscriberTest.php b/tests/Subscribers/GdprSubscriberTest.php deleted file mode 100644 index 3e4770f..0000000 --- a/tests/Subscribers/GdprSubscriberTest.php +++ /dev/null @@ -1,91 +0,0 @@ -expectException(EncryptException::class); - - $object = new \stdClass(); - $object->test = 'Test'; - - $encryptor = new OpenSslEncryptor($this->encrypt_key); - - $encryptor->encrypt($object); - } - - /** - * @throws \Exception - */ - public function testEncrypt() - { - $encryptor = new OpenSslEncryptor($this->encrypt_key); - - // Assert that empty value returns an empty value. - $result = $encryptor->encrypt(null); - $this->assertTrue($result === null); - - // Assert that "" returns an empty value; - $result = $encryptor->encrypt(""); - $this->assertTrue($result === ""); - - // Assert that an encrypted then decrypted value returns the original value; - $value = 'Honey, where are my pants?'; - $encryptedValue = $encryptor->encrypt($value); - $decrypted = $encryptor->decrypt($encryptedValue); - $this->assertTrue($value === $decrypted); - - } - - /** - * @throws \Exception - */ - public function testDecryptException() - { - $this->expectException(EncryptException::class); - // or for PHPUnit < 5.2 - // $this->setExpectedException(InvalidArgumentException::class); - - $object = new \stdClass(); - $object->test = 'Test'; - - //...and then add your test code that generates the exception - $encryptor = new OpenSslEncryptor($this->encrypt_key); - $encryptor->decrypt($object); - } - - /** - * @throws \Exception - */ - public function testDecrypt() - { - - $encryptor = new OpenSslEncryptor($this->encrypt_key); - - // Assert that empty value returns an empty value. - $result = $encryptor->decrypt(null); - $this->assertTrue($result === null); - - // Assert that string without "" returns an same string; - $result = $encryptor->decrypt("Test value assertTrue($result === "Test value decrypt('5hhCphjZSgXvZgAu9t3O99fnFsdDgHr67QR7lf8NVZdgHTH8Dj/gsfQ+AI2agJOc'); - $this->assertTrue($decrypted === 'Honey, where are my pants?'); - } -} diff --git a/tests/Utils/Disposal/AnonymiseDateTest.php b/tests/Utils/Disposal/AnonymiseDateTest.php index dd7b770..9f2ba40 100644 --- a/tests/Utils/Disposal/AnonymiseDateTest.php +++ b/tests/Utils/Disposal/AnonymiseDateTest.php @@ -6,7 +6,7 @@ * Time: 22:55 */ -namespace SpecShaper\GdpprBundle\tests\Unit\Disposal; +namespace SpecShaper\GdprBundle\tests\Unit\Disposal; use SpecShaper\GdprBundle\Utils\Disposal\AnonymiseDate; diff --git a/tests/Utils/Disposal/AnonymiseIPTest.php b/tests/Utils/Disposal/AnonymiseIPTest.php index 1601718..95a527d 100644 --- a/tests/Utils/Disposal/AnonymiseIPTest.php +++ b/tests/Utils/Disposal/AnonymiseIPTest.php @@ -6,7 +6,7 @@ * Time: 22:55 */ -namespace SpecShaper\GdpprBundle\tests\Unit\Disposal; +namespace SpecShaper\GdprBundle\tests\Unit\Disposal; use SpecShaper\GdprBundle\Utils\Disposal\AnonymiseIP; diff --git a/tests/Utils/Disposal/AnonymiseTest.php b/tests/Utils/Disposal/AnonymiseTest.php index de79600..3ce79a5 100644 --- a/tests/Utils/Disposal/AnonymiseTest.php +++ b/tests/Utils/Disposal/AnonymiseTest.php @@ -6,7 +6,7 @@ * Time: 22:55 */ -namespace SpecShaper\GdpprBundle\tests\Unit\Disposal; +namespace SpecShaper\GdprBundle\tests\Unit\Disposal; use SpecShaper\GdprBundle\Utils\Disposal\Anonymise; diff --git a/tests/Utils/Disposal/RegexReplaceTest.php b/tests/Utils/Disposal/RegexReplaceTest.php index 5481b25..3bd9582 100644 --- a/tests/Utils/Disposal/RegexReplaceTest.php +++ b/tests/Utils/Disposal/RegexReplaceTest.php @@ -6,7 +6,7 @@ * Time: 22:55 */ -namespace SpecShaper\GdpprBundle\tests\Unit\Disposal; +namespace SpecShaper\GdprBundle\tests\Unit\Disposal; use SpecShaper\GdprBundle\Utils\Disposal\RegexReplace;