-
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…loses #2823
- Loading branch information
1 parent
a7f3b5f
commit dea77e8
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Tests\Forms; | ||
|
||
use Statamic\Facades\Form; | ||
use Tests\TestCase; | ||
|
||
class SubmissionTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function the_id_is_generated_the_first_time_but_can_be_overridden() | ||
{ | ||
$submission = Form::make('test')->makeSubmission(); | ||
|
||
$this->assertNotNull($id = $submission->id()); | ||
$this->assertEquals($id, $submission->id()); | ||
$this->assertEquals($id, $submission->id()); | ||
|
||
$submission->id('123'); | ||
|
||
$this->assertEquals('123', $submission->id()); | ||
} | ||
} |