init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\MultiLocaleTranslation\Test\Unit\Model;
|
||||
|
||||
use Esun\MultiLocaleTranslation\Model\BlogPostFields;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BlogPostFieldsTest extends TestCase
|
||||
{
|
||||
public function testUrlKeyIsNotTranslatable(): void
|
||||
{
|
||||
self::assertNotContains('url_key', BlogPostFields::codes());
|
||||
}
|
||||
|
||||
public function testReadsDefaultMetaValueFromMageplazaStoreJson(): void
|
||||
{
|
||||
self::assertSame(
|
||||
'English meta title',
|
||||
BlogPostFields::baseValue('meta_title', '{"0":"English meta title","2":"French title"}')
|
||||
);
|
||||
self::assertSame('Plain value', BlogPostFields::baseValue('meta_title', 'Plain value'));
|
||||
self::assertSame('<p>Content</p>', BlogPostFields::baseValue('post_content', '<p>Content</p>'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user