mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 23:28:20 +00:00
This should fix all twig tests. Let's find out!
This commit is contained in:
@@ -72,6 +72,7 @@ class BillControllerTest extends TestCase
|
||||
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
|
||||
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency);
|
||||
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]);
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
$this->call('GET', '/bills/create');
|
||||
$this->assertViewHas('subTitle', 'Create new');
|
||||
@@ -111,6 +112,7 @@ class BillControllerTest extends TestCase
|
||||
$currency = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
|
||||
Amount::shouldReceive('getDefaultCurrency')->once()->andReturn($currency);
|
||||
Amount::shouldReceive('getAllCurrencies')->once()->andReturn([$currency]);
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
$this->call('GET', '/bills/edit/' . $bill->id);
|
||||
$this->assertViewHas('subTitle', 'Edit "' . e($bill->name) . '"');
|
||||
@@ -126,6 +128,7 @@ class BillControllerTest extends TestCase
|
||||
$collection->push($bill);
|
||||
|
||||
Amount::shouldReceive('format')->andReturn('XX');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('X');
|
||||
|
||||
$repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface');
|
||||
$repository->shouldReceive('getBills')->once()->andReturn($collection);
|
||||
@@ -187,6 +190,8 @@ class BillControllerTest extends TestCase
|
||||
Amount::shouldReceive('format')->andReturn('XX');
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('XX');
|
||||
|
||||
|
||||
|
||||
$this->call('GET', '/bills/show/' . $bill->id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user