More tests!

This commit is contained in:
James Cole
2015-01-01 13:43:34 +01:00
parent 402e8588cf
commit 74c9feb53f
5 changed files with 89 additions and 9 deletions

View File

@@ -98,12 +98,5 @@ class User extends Eloquent implements UserInterface, RemindableInterface
return $this->hasMany('TransactionJournal');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
*/
public function transactions()
{
return $this->hasManyThrough('TransactionJournal', 'Transaction');
}
}

View File

@@ -0,0 +1,9 @@
<?php
League\FactoryMuffin\Facade::define(
'Preference', [
'user_id' => 'factory|User',
'name' => 'word',
'data' => 'sentence',
]
);

View File

@@ -10,7 +10,21 @@ League\FactoryMuffin\Facade::define(
return $code;
},
'name' => 'word',
'symbol' => '$'
'name' => function () {
$code = '';
for ($i = 0; $i < 8; $i++) {
$code .= chr(rand(65, 90));
}
return $code;
},
'symbol' => function () {
$code = '';
for ($i = 0; $i < 2; $i++) {
$code .= chr(rand(65, 90));
}
return $code;
}
]
);