Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Also test PHP 7.2
James Coleae273f83200d
diff --git a/.travis.yml b/.travis.ymlindex 100fc61eeb..4543dc5049 100644--- a/.travis.yml+++ b/.travis.yml@@ -1,6 +1,7 @@language: phpphp:- 7.1+ - 7.2cache:directories:diff --git a/public/js/ff/moment/tr_TR.js b/public/js/ff/moment/tr_TR.jsindex 9e889dc917..c28097304d 100644--- a/public/js/ff/moment/tr_TR.js+++ b/public/js/ff/moment/tr_TR.js@@ -130,7 +130,7 @@ var suffixes$4 = {90: '\'ıncı'};-hooks.defineLocale('tr_TR', {+moment.defineLocale('tr_TR', {months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),diff --git a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.phpindex dd347ecdca..fe774da3cc 100644--- a/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php+++ b/tests/Feature/Controllers/Auth/TwoFactorControllerTest.php@@ -57,10 +57,13 @@ class TwoFactorControllerTest extends TestCase$truePref->data = true;$secretPreference = new Preference;$secretPreference->data = 'JZMES376Z6YXY4QZ';+ $langPreference = new Preference;+ $langPreference->data = 'en_US';Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference)->once();+ Preferences::shouldReceive('get')->withArgs(['language', 'en_US'])->andReturn($langPreference);$response = $this->get(route('two-factor.index'));$response->assertStatus(200);@@ -75,9 +78,13 @@ class TwoFactorControllerTest extends TestCase$falsePreference = new Preference;$falsePreference->data = false;+ $langPreference = new Preference;+ $langPreference->data = 'en_US';+Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference)->twice();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn(null)->once();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn(null)->once();+ Preferences::shouldReceive('get')->withArgs(['language', 'en_US'])->andReturn($langPreference);$response = $this->get(route('two-factor.index'));$response->assertStatus(302);@@ -96,9 +103,13 @@ class TwoFactorControllerTest extends TestCase$truePref->data = true;$secretPreference = new Preference;$secretPreference->data = '';+ $langPreference = new Preference;+ $langPreference->data = 'en_US';+Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference)->once();+ Preferences::shouldReceive('get')->withArgs(['language', 'en_US'])->andReturn($langPreference);$response = $this->get(route('two-factor.index'));$response->assertStatus(500);@@ -115,9 +126,13 @@ class TwoFactorControllerTest extends TestCase$truePreference->data = true;$secretPreference = new Preference;$secretPreference->data = 'JZMES376Z6YXY4QZ';+ $langPreference = new Preference;+ $langPreference->data = 'en_US';+Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePreference);Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference);Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->andReturn($secretPreference);+ Preferences::shouldReceive('get')->withArgs(['language', 'en_US'])->andReturn($langPreference);$response = $this->get(route('two-factor.lost'));$response->assertStatus(200);diff --git a/tests/Feature/Controllers/NewUserControllerTest.php b/tests/Feature/Controllers/NewUserControllerTest.phpindex 1752a5ad52..1a107b62b3 100644--- a/tests/Feature/Controllers/NewUserControllerTest.php+++ b/tests/Feature/Controllers/NewUserControllerTest.php@@ -97,13 +97,14 @@ class NewUserControllerTest extends TestCase$accountRepos = $this->mock(AccountRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);- $accountRepos->shouldReceive('store')->times(2);+ $accountRepos->shouldReceive('store')->times(3);$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));$data = ['bank_name' => 'New bank','savings_balance' => '1000','bank_balance' => '100',+ 'language' => 'en_US','amount_currency_id_bank_balance' => 1,];$this->be($this->emptyUser());@@ -122,7 +123,7 @@ class NewUserControllerTest extends TestCase$accountRepos = $this->mock(AccountRepositoryInterface::class);$journalRepos = $this->mock(JournalRepositoryInterface::class);$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);- $accountRepos->shouldReceive('store')->twice();+ $accountRepos->shouldReceive('store')->times(3);$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));$data = [diff --git a/tests/Feature/Controllers/PreferencesControllerTest.php b/tests/Feature/Controllers/PreferencesControllerTest.phpindex 341d69d1f5..224130c430 100644--- a/tests/Feature/Controllers/PreferencesControllerTest.php+++ b/tests/Feature/Controllers/PreferencesControllerTest.php@@ -30,7 +30,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;use Illuminate\Support\Collection;use Log;use Tests\TestCase;-+use Preferences;/*** Class PreferencesControllerTest*