-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a0892a
commit 4508fca
Showing
6 changed files
with
36 additions
and
36 deletions.
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 |
---|---|---|
|
@@ -53,25 +53,25 @@ public function testFactoryStateIsMerged() | |
|
||
protected function assertFactoryDefinitionsAreMerged(Product $product) | ||
{ | ||
$this->assertEquals(5, $product->price); | ||
$this->assertSame(5, $product->price); | ||
|
||
$this->assertEquals('English name', $product->name); | ||
$this->assertEquals('Spanish name', $product->{'name:es'}); | ||
$this->assertEquals('Factory definition name', $product->{'name:es-MX'}); | ||
$this->assertEquals('Factory definition name', $product->{'name:es-CO'}); | ||
$this->assertSame('English name', $product->name); | ||
$this->assertSame('Spanish name', $product->{'name:es'}); | ||
$this->assertSame('Factory definition name', $product->{'name:es-MX'}); | ||
$this->assertSame('Factory definition name', $product->{'name:es-CO'}); | ||
} | ||
|
||
public function testMultipleFactoryStatesAreMerged() | ||
{ | ||
$product = $this->populator->add(Product::class)->states('expensive', 'new') | ||
->translationStates('Laravel', 'awesome')->make(); | ||
|
||
$this->assertEquals(500, $product->price); | ||
$this->assertSame(500, $product->price); | ||
$this->assertEquals(Carbon::today(), $product->created_at); | ||
|
||
$this->assertEquals('English name', $product->name); | ||
$this->assertEquals('Laravel', $product->{'name:es-MX'}); | ||
$this->assertEquals('This product is awesome', $product->description); | ||
$this->assertSame('English name', $product->name); | ||
$this->assertSame('Laravel', $product->{'name:es-MX'}); | ||
$this->assertSame('This product is awesome', $product->description); | ||
} | ||
|
||
public function testStateWithoutDefitionIsMerged() | ||
|
@@ -82,7 +82,7 @@ public function testStateWithoutDefitionIsMerged() | |
|
||
$user = $this->populator->make(User::class, 'email_state'); | ||
|
||
$this->assertEquals('[email protected]', $user->email); | ||
$this->assertSame('[email protected]', $user->email); | ||
} | ||
|
||
/** | ||
|
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
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