Skip to content

Commit

Permalink
Populator is in testing mode when raw() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
guidocella committed Feb 18, 2017
1 parent af7692f commit eda88be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ModelPopulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ModelPopulator

/**
* Whether Populator is in testing mode.
* true when calling create() or make().
* true when calling create(), make() or raw().
*
* @var bool
*/
Expand Down Expand Up @@ -790,7 +790,7 @@ public function make($customAttributes = [], $persist = false)
*/
protected function associateNullableForeignKeys()
{
// When calling create() or make(), foreign keys are populated even if nullable,
// When calling create(), make() or raw(), foreign keys are populated even if nullable,
// so models created for testing have predictable foreign key values.
// However, when the formatters are guessed it's still unknown whether create(), make(), execute() or seed()
// will be called, so we'll override the foreign key formatters in question now.
Expand Down

0 comments on commit eda88be

Please sign in to comment.