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;
@@ -34,14 +33,12 @@ use Tests\TestCase;
/**
* Class CurrencyControllerTest
*
* @package Tests\Feature\Controllers
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class CurrencyControllerTest extends TestCase
{
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::create
*/
@@ -73,7 +70,6 @@ class CurrencyControllerTest extends TestCase
$repository->shouldReceive('canDeleteCurrency')->andReturn(false);
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
$this->be($this->user());
$response = $this->get(route('currencies.delete', [2]));
$response->assertStatus(302);
@@ -95,7 +91,6 @@ class CurrencyControllerTest extends TestCase
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
$this->session(['currencies.delete.uri' => 'http://localhost']);
$this->be($this->user());
$response = $this->post(route('currencies.destroy', [1]));
@@ -174,7 +169,6 @@ class CurrencyControllerTest extends TestCase
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$userRepos->shouldReceive('hasRole')->once()->andReturn(true);
$this->session(['currencies.delete.uri' => 'http://localhost']);
$this->be($this->user());
$response = $this->post(route('currencies.destroy', [1]));
@@ -328,5 +322,4 @@ class CurrencyControllerTest extends TestCase
$response->assertStatus(302);
$response->assertSessionHas('success');
}
}