Skip to content
Permalink
Browse files

Fix structure field unit tests

  • Loading branch information...
bastianallgeier committed Oct 23, 2019
1 parent eefd532 commit b1aa14d9c3b4c0ba4864fa8ce370cfb5dd23463f
Showing with 16 additions and 4 deletions.
  1. +16 −4 tests/Form/Fields/StructureFieldTest.php
@@ -10,13 +10,17 @@ class StructureFieldTest extends TestCase
public function testDefaultProps()
{
$field = $this->field('structure', [
'fields' => []
'fields' => [
'text' => [
'type' => 'text'
]
]
]);
$this->assertEquals('structure', $field->type());
$this->assertEquals('structure', $field->name());
$this->assertEquals(null, $field->limit());
$this->assertEquals([], $field->fields());
$this->assertTrue(is_array($field->fields()));
$this->assertEquals([], $field->value());
$this->assertTrue($field->save());
}
@@ -216,7 +220,11 @@ public function testFloatsWithNonUsLocale()
public function testEmpty()
{
$field = $this->field('structure', [
'fields' => [],
'fields' => [
'text' => [
'type' => 'text'
]
],
'empty' => 'Test'
]);
@@ -226,7 +234,11 @@ public function testEmpty()
public function testTranslatedEmpty()
{
$field = $this->field('structure', [
'fields' => [],
'fields' => [
'text' => [
'type' => 'text'
]
],
'empty' => ['en' => 'Test', 'de' => 'Töst']
]);

0 comments on commit b1aa14d

Please sign in to comment.
You can’t perform that action at this time.