Code cleanup.

This commit is contained in:
James Cole
2017-11-22 21:12:27 +01:00
parent 4e6b782204
commit 781ca052d8
142 changed files with 213 additions and 859 deletions

View File

@@ -18,7 +18,6 @@
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Feature\Controllers\Import;
@@ -33,7 +32,6 @@ use Tests\TestCase;
/**
* Class FileControllerTest
*
* @package Tests\Feature\Controllers\Import
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -54,7 +52,6 @@ class FileControllerTest extends TestCase
$configurator->shouldReceive('getNextView')->once()->andReturn('import.csv.initial');
$configurator->shouldReceive('getNextData')->andReturn(['specifics' => [], 'delimiters' => [], 'accounts' => []])->once();
$this->be($this->user());
$response = $this->get(route('import.file.configure', ['configure']));
$response->assertStatus(200);
@@ -89,7 +86,6 @@ class FileControllerTest extends TestCase
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Import\FileController::initialize
*/
@@ -156,7 +152,6 @@ class FileControllerTest extends TestCase
$configurator->shouldReceive('configureJob')->once()->andReturn(false);
$configurator->shouldReceive('getWarningMessage')->once()->andReturn('');
$this->be($this->user());
$response = $this->post(route('import.file.process-configuration', ['running']));
$response->assertStatus(302);
@@ -172,7 +167,6 @@ class FileControllerTest extends TestCase
$configurator->shouldReceive('setJob')->once();
$configurator->shouldReceive('isJobConfigured')->once()->andReturn(true);
$this->be($this->user());
$response = $this->post(route('import.file.process-configuration', ['running']));
$response->assertStatus(302);
@@ -188,7 +182,6 @@ class FileControllerTest extends TestCase
$importer->shouldReceive('setJob')->once();
$importer->shouldReceive('run')->once()->andReturn(true);
$this->be($this->user());
$response = $this->post(route('import.file.start', ['running']));
$response->assertStatus(200);
@@ -204,7 +197,6 @@ class FileControllerTest extends TestCase
$importer->shouldReceive('setJob')->once();
$importer->shouldReceive('run')->once()->andReturn(false);
$this->be($this->user());
$response = $this->post(route('import.file.start', ['running']));
$response->assertStatus(500);
@@ -230,5 +222,4 @@ class FileControllerTest extends TestCase
$response->assertStatus(302);
$response->assertRedirect(route('import.file.configure', ['new']));
}
}