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;
@@ -37,14 +36,12 @@ use Tests\TestCase;
/**
* Class RuleControllerTest
*
* @package Tests\Feature\Controllers
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class RuleControllerTest extends TestCase
{
/**
* @covers \FireflyIII\Http\Controllers\RuleController::create
*/
@@ -77,7 +74,6 @@ class RuleControllerTest extends TestCase
];
$this->session(['_old_input' => $old]);
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
@@ -223,7 +219,7 @@ class RuleControllerTest extends TestCase
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$data = ['actions' => [1, 2, 3],];
$data = ['actions' => [1, 2, 3]];
$repository->shouldReceive('reorderRuleActions')->once();
$this->be($this->user());
@@ -241,7 +237,7 @@ class RuleControllerTest extends TestCase
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$data = ['triggers' => [1, 2, 3],];
$data = ['triggers' => [1, 2, 3]];
$repository->shouldReceive('reorderRuleTriggers')->once();
$this->be($this->user());
@@ -289,7 +285,6 @@ class RuleControllerTest extends TestCase
}
/**
*
* @covers \FireflyIII\Http\Controllers\RuleController::testTriggers
* @covers \FireflyIII\Http\Controllers\RuleController::getValidTriggerList
*/
@@ -419,5 +414,4 @@ class RuleControllerTest extends TestCase
$response->assertStatus(302);
$response->assertSessionHas('success');
}
}