Skip to content

Commit

Permalink
Field test
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Dec 13, 2024
1 parent 34b3dc5 commit 9a32871
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Fields/FieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ public function preProcess($data)
'visibility' => 'visible',
'replicator_preview' => true,
'duplicate' => true,
'revisable' => true,
'type' => 'example',
'validate' => 'required',
'foo' => 'bar',
Expand Down Expand Up @@ -647,4 +648,20 @@ public function it_gets_and_sets_the_form()
$this->assertEquals($field, $return);
$this->assertEquals($form, $field->form());
}

#[Test]
public function it_defaults_to_revisable()
{
$field = new Field('test', ['type' => 'text']);

$this->assertTrue($field->isRevisable());
}

#[Test]
public function it_gets_revisable()
{
$field = new Field('test', ['type' => 'text', 'revisable' => false]);

$this->assertFalse($field->isRevisable());
}
}

0 comments on commit 9a32871

Please sign in to comment.