Update PHPUnit, run static analysis on tests

This commit is contained in:
Lukáš Unger
2018-02-11 23:14:34 +01:00
parent 97089ad49e
commit 1f87c7a7be
9 changed files with 33 additions and 30 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace LeagueTests\Utils;
use LeagueTests\Stubs\CryptTraitStub;
use PHPUnit\Framework\TestCase;
class CryptTraitTest extends TestCase
{
/**
* @var \LeagueTests\Stubs\CryptTraitStub
*/
protected $cryptStub;
public function setUp()
{
$this->cryptStub = new CryptTraitStub;
}
public function testEncryptDecrypt()
{
$payload = 'alex loves whisky';
$encrypted = $this->cryptStub->doEncrypt($payload);
$plainText = $this->cryptStub->doDecrypt($encrypted);
$this->assertNotEquals($payload, $encrypted);
$this->assertEquals($payload, $plainText);
}
}