Improve test coverage, mark as deprecated.

This commit is contained in:
James Cole
2018-05-05 13:53:12 +02:00
parent bc7c3bb9b3
commit 19fff681d2
22 changed files with 701 additions and 379 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace tests\Unit\Import\Specifics;
use FireflyIII\Import\Specifics\RabobankDescription;
use Tests\TestCase;
/**
@@ -31,9 +32,44 @@ use Tests\TestCase;
*/
class RabobankDescriptionTest extends TestCase
{
/**
* Default behaviour
* @covers \FireflyIII\Import\Specifics\RabobankDescription
*/
public function testRunBasic(): void
{
$this->assertTrue(true);
$row = ['','','','','','','','','','',''];
$parser = new RabobankDescription;
$result = $parser->run($row);
$this->assertEquals($row, $result);
}
/**
* No opposite name or iban
* @covers \FireflyIII\Import\Specifics\RabobankDescription
*/
public function testRunUseDescription(): void
{
$row = ['','','','','','','','','','','Hello'];
$parser = new RabobankDescription;
$result = $parser->run($row);
$this->assertEquals('Hello', $result[6]);
$this->assertEquals('', $result[10]);
}
/**
* Has opposite name or iban
* @covers \FireflyIII\Import\Specifics\RabobankDescription
*/
public function testRunUseFilledIn(): void
{
$row = ['','','','','','ABC','','','','',''];
$parser = new RabobankDescription;
$result = $parser->run($row);
$this->assertEquals($row, $result);
}
}