Fix test method names.

This commit is contained in:
James Cole
2018-09-02 20:27:26 +02:00
parent de754ca4e0
commit eaf2667abb
90 changed files with 675 additions and 676 deletions

View File

@@ -40,7 +40,7 @@ class ExchangeControllerTest extends TestCase
/**
*
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
Log::debug(sprintf('Now in %s.', \get_class($this)));
@@ -61,6 +61,20 @@ class ExchangeControllerTest extends TestCase
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Json\ExchangeController
*/
public function testGetRateAmount(): void
{
$repository = $this->mock(CurrencyRepositoryInterface::class);
$rate = factory(CurrencyExchangeRate::class)->make();
$repository->shouldReceive('getExchangeRate')->andReturn($rate);
$this->be($this->user());
$response = $this->get(route('json.rate', ['EUR', 'USD', '20170101']) . '?amount=10');
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Json\ExchangeController
*/
@@ -78,18 +92,4 @@ class ExchangeControllerTest extends TestCase
$response = $this->get(route('json.rate', ['EUR', 'USD', '20170101']));
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Json\ExchangeController
*/
public function testGetRateAmount(): void
{
$repository = $this->mock(CurrencyRepositoryInterface::class);
$rate = factory(CurrencyExchangeRate::class)->make();
$repository->shouldReceive('getExchangeRate')->andReturn($rate);
$this->be($this->user());
$response = $this->get(route('json.rate', ['EUR', 'USD', '20170101']) . '?amount=10');
$response->assertStatus(200);
}
}