-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict the first name to 20 characters
- Loading branch information
Showing
2 changed files
with
29 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,28 @@ | ||
<?php | ||
|
||
namespace ChinLeung\Converge\Tests; | ||
|
||
use ChinLeung\Converge\Customer; | ||
use Illuminate\Support\Arr; | ||
use Orchestra\Testbench\TestCase; | ||
|
||
class CustomerTest extends TestCase | ||
{ | ||
/** | ||
* The first name of the customer will be truncated to 20 characters. | ||
* | ||
* @test | ||
* @return void | ||
*/ | ||
public function the_first_name_will_be_truncated_to_20_characters(): void | ||
{ | ||
$customer = Customer::make()->setFirstName( | ||
'Uvuvwevwevwe Onyetenyevwe Ugwemuhwem Osas' | ||
); | ||
|
||
$this->assertEquals( | ||
'Uvuvwevwevwe Onyeten', | ||
Arr::get($customer->toPayload(), 'ssl_first_name') | ||
); | ||
} | ||
} |