mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Push updated tests.
This commit is contained in:
@@ -48,7 +48,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -82,7 +82,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic CC account #' . rand(1, 1000),
|
||||
'name' => 'Basic CC account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'ccAsset',
|
||||
@@ -119,7 +119,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'expense',
|
||||
'iban' => null,
|
||||
'name' => 'Basic expense account #' . rand(1, 1000),
|
||||
'name' => 'Basic expense account #' . random_int(1, 1000),
|
||||
'virtualBalance' => '1243',
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -153,7 +153,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -194,7 +194,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -234,7 +234,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => 'NL18RABO0326747238',
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -268,7 +268,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => 'NL1XRABO032674X238',
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -302,7 +302,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
@@ -343,7 +343,7 @@ class AccountFactoryTest extends TestCase
|
||||
'account_type_id' => null,
|
||||
'accountType' => 'asset',
|
||||
'iban' => null,
|
||||
'name' => 'Basic asset account #' . rand(1, 1000),
|
||||
'name' => 'Basic asset account #' . random_int(1, 1000),
|
||||
'virtualBalance' => null,
|
||||
'active' => true,
|
||||
'accountRole' => 'defaultAsset',
|
||||
|
@@ -42,8 +42,8 @@ class BillFactoryTest extends TestCase
|
||||
public function testCreateBasic()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'Some new bill #' . rand(1, 1000),
|
||||
'match' => 'i,am,word' . rand(1, 1000),
|
||||
'name' => 'Some new bill #' . random_int(1, 1000),
|
||||
'match' => 'i,am,word' . random_int(1, 1000),
|
||||
'amount_min' => '5',
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
@@ -77,8 +77,8 @@ class BillFactoryTest extends TestCase
|
||||
public function testCreateEmptyNotes()
|
||||
{
|
||||
$data = [
|
||||
'name' => 'Some new bill #' . rand(1, 1000),
|
||||
'match' => 'i,am,word' . rand(1, 1000),
|
||||
'name' => 'Some new bill #' . random_int(1, 1000),
|
||||
'match' => 'i,am,word' . random_int(1, 1000),
|
||||
'amount_min' => '5',
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
@@ -146,7 +146,7 @@ class BillFactoryTest extends TestCase
|
||||
/** @var BillFactory $factory */
|
||||
$factory = app(BillFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$piggy = $factory->find(null, 'I dont exist' . rand(1, 1000));
|
||||
$piggy = $factory->find(null, 'I dont exist' . random_int(1, 1000));
|
||||
|
||||
$this->assertNull($piggy);
|
||||
}
|
||||
|
@@ -91,7 +91,7 @@ class BudgetFactoryTest extends TestCase
|
||||
/** @var BudgetFactory $factory */
|
||||
$factory = app(BudgetFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$this->assertNull($factory->find(null, 'I dont exist.' . rand(1, 000)));
|
||||
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ class CategoryFactoryTest extends TestCase
|
||||
public function testFindOrCreateInvalidID()
|
||||
{
|
||||
$existing = $this->user()->categories()->max('id');
|
||||
$existing = $existing + 4;
|
||||
$existing += 4;
|
||||
|
||||
/** @var CategoryFactory $factory */
|
||||
$factory = app(CategoryFactory::class);
|
||||
@@ -80,7 +80,7 @@ class CategoryFactoryTest extends TestCase
|
||||
*/
|
||||
public function testFindOrCreateNewName()
|
||||
{
|
||||
$name = 'Some new category #' . rand(1, 1000);
|
||||
$name = 'Some new category #' . random_int(1, 1000);
|
||||
|
||||
/** @var CategoryFactory $factory */
|
||||
$factory = app(CategoryFactory::class);
|
||||
|
@@ -91,6 +91,6 @@ class PiggyBankFactoryTest extends TestCase
|
||||
/** @var PiggyBankFactory $factory */
|
||||
$factory = app(PiggyBankFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$this->assertNull($factory->find(null, 'I dont exist.' . rand(1, 000)));
|
||||
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000)));
|
||||
}
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ class TagFactoryTest extends TestCase
|
||||
*/
|
||||
public function testFindOrCreateNew()
|
||||
{
|
||||
$tag = 'Some new tag#' . rand(1, 1000);
|
||||
$tag = 'Some new tag#' . random_int(1, 1000);
|
||||
/** @var TagFactory $factory */
|
||||
$factory = app(TagFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
|
Reference in New Issue
Block a user