mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-23 09:26:29 -06:00
Fix tests.
This commit is contained in:
parent
309f9cd076
commit
0ae8418f32
@ -43,7 +43,6 @@ class CsvProcessorTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetObjectsNoJob()
|
public function testGetObjectsNoJob()
|
||||||
{
|
{
|
||||||
|
|
||||||
$processor = new CsvProcessor();
|
$processor = new CsvProcessor();
|
||||||
$processor->getObjects();
|
$processor->getObjects();
|
||||||
}
|
}
|
||||||
@ -137,11 +136,13 @@ class CsvProcessorTest extends TestCase
|
|||||||
$repository->shouldReceive('setUser')->withArgs([Mockery::any()])->once();
|
$repository->shouldReceive('setUser')->withArgs([Mockery::any()])->once();
|
||||||
$repository->shouldReceive('getConfiguration')->andReturn($config);
|
$repository->shouldReceive('getConfiguration')->andReturn($config);
|
||||||
$repository->shouldReceive('uploadFileContents')->withArgs([Mockery::any()])->andReturn($csvFile)->once();
|
$repository->shouldReceive('uploadFileContents')->withArgs([Mockery::any()])->andReturn($csvFile)->once();
|
||||||
$repository->shouldReceive('getExtendedStatus')->twice()->andReturn([]); // twice for update errors.
|
$repository->shouldReceive('getExtendedStatus')->once()->andReturn([]); // twice for update errors.
|
||||||
$repository->shouldReceive('setExtendedStatus')->twice()->andReturn($job);
|
$repository->shouldReceive('setExtendedStatus')->once()->andReturn($job);
|
||||||
|
|
||||||
// mock stuff for this single row:
|
// mock stuff for this single row:
|
||||||
$repository->shouldReceive('countByHash')->once()->withArgs([Mockery::any()])->andReturn(1);
|
$repository->shouldReceive('countByHash')->once()->withArgs([Mockery::any()])->andReturn(1);
|
||||||
$repository->shouldReceive('addStepsDone')->once()->withArgs([Mockery::any(), 5]);
|
$repository->shouldReceive('addStepsDone')->once()->withArgs([Mockery::any(), 5]);
|
||||||
|
$repository->shouldReceive('addError')->once()->withArgs([Mockery::any(), 0, 'Row #0 has already been imported.']);
|
||||||
$processor = new CsvProcessor();
|
$processor = new CsvProcessor();
|
||||||
$processor->setJob($job);
|
$processor->setJob($job);
|
||||||
$processor->run();
|
$processor->run();
|
||||||
|
@ -309,7 +309,7 @@ class BinderTest extends TestCase
|
|||||||
public function testBudgetLimit()
|
public function testBudgetLimit()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{budgetlimit}', function () {
|
'/_test/binder/{budgetLimit}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -328,7 +328,7 @@ class BinderTest extends TestCase
|
|||||||
public function testBudgetLimitNotFound()
|
public function testBudgetLimitNotFound()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{budgetlimit}', function () {
|
'/_test/binder/{budgetLimit}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -347,7 +347,7 @@ class BinderTest extends TestCase
|
|||||||
public function testBudgetLimitNotLoggedIn()
|
public function testBudgetLimitNotLoggedIn()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{budgetlimit}', function () {
|
'/_test/binder/{budgetLimit}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -1423,7 +1423,7 @@ class BinderTest extends TestCase
|
|||||||
public function testTransactionType()
|
public function testTransactionType()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{transaction_type}', function () {
|
'/_test/binder/{transactionType}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -1442,7 +1442,7 @@ class BinderTest extends TestCase
|
|||||||
public function testTransactionTypeNotFound()
|
public function testTransactionTypeNotFound()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{transaction_type}', function () {
|
'/_test/binder/{transactionType}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -1461,7 +1461,7 @@ class BinderTest extends TestCase
|
|||||||
public function testTransactionTypeNotLoggedIn()
|
public function testTransactionTypeNotLoggedIn()
|
||||||
{
|
{
|
||||||
Route::middleware(Binder::class)->any(
|
Route::middleware(Binder::class)->any(
|
||||||
'/_test/binder/{transaction_type}', function () {
|
'/_test/binder/{transactionType}', function () {
|
||||||
return 'OK';
|
return 'OK';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user