Skip to content

Commit

Permalink
Add dto translation test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Mar 4, 2024
1 parent 9ec0d4d commit 42e64be
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/Unit/Dto/TranslationTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/

namespace Pimcore\Bundle\StudioApiBundle\Tests\Unit\Dto;

use Codeception\Test\Unit;
use Pimcore\Bundle\StudioApiBundle\Dto\Translation;

final class TranslationTest extends Unit
{
public function testTranslation(): void
{
$translation = new Translation('en', ['login']);
$this->assertSame('en', $translation->getLocale());
$this->assertIsArray($translation->getKeys());
$this->assertCount(1, $translation->getKeys());
$this->assertContains('login', $translation->getKeys());
}
}

0 comments on commit 42e64be

Please sign in to comment.