mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Also test PHP 7.2
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
language: php
|
language: php
|
||||||
php:
|
php:
|
||||||
- 7.1
|
- 7.1
|
||||||
|
- 7.2
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
2
public/js/ff/moment/tr_TR.js
vendored
2
public/js/ff/moment/tr_TR.js
vendored
@@ -130,7 +130,7 @@ var suffixes$4 = {
|
|||||||
90: '\'ıncı'
|
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('_'),
|
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('_'),
|
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('_'),
|
weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
|
||||||
|
@@ -57,10 +57,13 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
$truePref->data = true;
|
$truePref->data = true;
|
||||||
$secretPreference = new Preference;
|
$secretPreference = new Preference;
|
||||||
$secretPreference->data = 'JZMES376Z6YXY4QZ';
|
$secretPreference->data = 'JZMES376Z6YXY4QZ';
|
||||||
|
$langPreference = new Preference;
|
||||||
|
$langPreference->data = 'en_US';
|
||||||
|
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->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 = $this->get(route('two-factor.index'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
@@ -75,9 +78,13 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
|
|
||||||
$falsePreference = new Preference;
|
$falsePreference = new Preference;
|
||||||
$falsePreference->data = false;
|
$falsePreference->data = false;
|
||||||
|
$langPreference = new Preference;
|
||||||
|
$langPreference->data = 'en_US';
|
||||||
|
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference)->twice();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($falsePreference)->twice();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn(null)->once();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn(null)->once();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->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 = $this->get(route('two-factor.index'));
|
||||||
$response->assertStatus(302);
|
$response->assertStatus(302);
|
||||||
@@ -96,9 +103,13 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
$truePref->data = true;
|
$truePref->data = true;
|
||||||
$secretPreference = new Preference;
|
$secretPreference = new Preference;
|
||||||
$secretPreference->data = '';
|
$secretPreference->data = '';
|
||||||
|
$langPreference = new Preference;
|
||||||
|
$langPreference->data = 'en_US';
|
||||||
|
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePref)->twice();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference)->once();
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->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 = $this->get(route('two-factor.index'));
|
||||||
$response->assertStatus(500);
|
$response->assertStatus(500);
|
||||||
@@ -115,9 +126,13 @@ class TwoFactorControllerTest extends TestCase
|
|||||||
$truePreference->data = true;
|
$truePreference->data = true;
|
||||||
$secretPreference = new Preference;
|
$secretPreference = new Preference;
|
||||||
$secretPreference->data = 'JZMES376Z6YXY4QZ';
|
$secretPreference->data = 'JZMES376Z6YXY4QZ';
|
||||||
|
$langPreference = new Preference;
|
||||||
|
$langPreference->data = 'en_US';
|
||||||
|
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePreference);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthEnabled', false])->andReturn($truePreference);
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference);
|
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret', null])->andReturn($secretPreference);
|
||||||
Preferences::shouldReceive('get')->withArgs(['twoFactorAuthSecret'])->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 = $this->get(route('two-factor.lost'));
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
|
@@ -97,13 +97,14 @@ class NewUserControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('store')->times(2);
|
$accountRepos->shouldReceive('store')->times(3);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'bank_name' => 'New bank',
|
'bank_name' => 'New bank',
|
||||||
'savings_balance' => '1000',
|
'savings_balance' => '1000',
|
||||||
'bank_balance' => '100',
|
'bank_balance' => '100',
|
||||||
|
'language' => 'en_US',
|
||||||
'amount_currency_id_bank_balance' => 1,
|
'amount_currency_id_bank_balance' => 1,
|
||||||
];
|
];
|
||||||
$this->be($this->emptyUser());
|
$this->be($this->emptyUser());
|
||||||
@@ -122,7 +123,7 @@ class NewUserControllerTest extends TestCase
|
|||||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||||
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
|
||||||
$accountRepos->shouldReceive('store')->twice();
|
$accountRepos->shouldReceive('store')->times(3);
|
||||||
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
@@ -30,7 +30,7 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
|||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
use Preferences;
|
||||||
/**
|
/**
|
||||||
* Class PreferencesControllerTest
|
* Class PreferencesControllerTest
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user