-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for @original replacement
- Loading branch information
1 parent
7cc9f89
commit 8181e83
Showing
3 changed files
with
35 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
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 |
---|---|---|
|
@@ -32,4 +32,23 @@ public function nonFakerTransformersWork() | |
$this->transformer->transform('test', '@iso8601Recent') | ||
); | ||
} | ||
|
||
/** @test */ | ||
public function max_modifier_works() | ||
{ | ||
$this->assertEquals(8, strlen($this->transformer->transform('test', '@userName|max:8'))); | ||
} | ||
|
||
/** @test */ | ||
public function static_values_work() | ||
{ | ||
$this->assertEquals('replacementValue', $this->transformer->transform('test', 'replacementValue')); | ||
} | ||
|
||
/** @test */ | ||
public function original_replacement_works() | ||
{ | ||
$this->assertEquals('[email protected]', $this->transformer->transform('[email protected]', '@original')); | ||
$this->assertEquals('admin@exa', $this->transformer->transform('[email protected]', '@original|max:9')); | ||
} | ||
} |