. */ declare(strict_types=1); namespace Tests\Unit\Transformers; use FireflyIII\Models\Preference; use FireflyIII\Transformers\PreferenceTransformer; use Log; use Symfony\Component\HttpFoundation\ParameterBag; use Tests\TestCase; /** * Class PreferenceTransformerTest * @SuppressWarnings(PHPMD.CouplingBetweenObjects) * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class PreferenceTransformerTest extends TestCase { /** * */ public function setUp(): void { parent::setUp(); Log::info(sprintf('Now in %s.', get_class($this))); } /** * Test basic tag transformer * * @covers \FireflyIII\Transformers\PreferenceTransformer */ public function testBasic(): void { /** @var Preference $preference */ $preference = Preference::first(); $transformer = app(PreferenceTransformer::class); $transformer->setParameters(new ParameterBag); $result = $transformer->transform($preference); $this->assertEquals($preference->name, $result['name']); } }