Skip to content

Commit

Permalink
fix: updated integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
clphillips committed Jun 5, 2017
1 parent 0c1176f commit c5ad909
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/Integration/AesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
class AesTest extends TestCase
{

/**
* Test the cipher
*
Expand All @@ -26,7 +25,6 @@ public function testCipher($key, $mode, $iv, $input)
$aes = new Aes($key, $mode, $iv);

$cipherText = $aes->encrypt($input);
$this->assertNotEquals($cipherText, $input);

$result = $aes->decrypt($cipherText);
$this->assertEquals($result, $input);
Expand All @@ -48,7 +46,14 @@ public function cipherProvider()
);
$modes = array('ECB', 'CBC', 'CFB', 'OFB');

$input = array(file_get_contents('./fixtures/example.txt'), 'hello world!', '');
$input = array(
file_get_contents(
dirname(__FILE__) . DIRECTORY_SEPARATOR
. "Fixtures" . DIRECTORY_SEPARATOR . 'example.txt'
),
'hello world!',
''
);

$params = array();
foreach ($modes as $mode) {
Expand Down

0 comments on commit c5ad909

Please sign in to comment.