. */ declare(strict_types=1); namespace Tests\Unit\Import\Specifics; use FireflyIII\Import\Specifics\SnsDescription; use Log; use Tests\TestCase; /** * Class SnsDescriptionTest * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class SnsDescriptionTest extends TestCase { /** * */ public function setUp(): void { parent::setUp(); Log::info(sprintf('Now in %s.', get_class($this))); } /** * @covers \FireflyIII\Import\Specifics\SnsDescription */ public function testRunBasic(): void { $row = ['a', 'b', 'c']; $parser = new SnsDescription; $result = $parser->run($row); $this->assertEquals($row, $result); } /** * @covers \FireflyIII\Import\Specifics\SnsDescription */ public function testRunNoQuotes(): void { $row = ['a', 'b', 'c', 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'Some text']; $parser = new SnsDescription; $result = $parser->run($row); $this->assertEquals($row, $result); $this->assertEquals('Some text', $result[17]); } /** * @covers \FireflyIII\Import\Specifics\SnsDescription */ public function testRunQuotes(): void { $row = ['a', 'b', 'c', 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, '\'Some text\'']; $parser = new SnsDescription; $result = $parser->run($row); $this->assertEquals('Some text', $result[17]); } }