Updated some tests.

This commit is contained in:
James Cole
2016-11-20 07:24:18 +01:00
parent 26190524f4
commit f8c5c15655
53 changed files with 207 additions and 269 deletions

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class AccountControllerTest extends TestCase
{
/**
* @var AccountController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Admin;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class ConfigurationControllerTest extends TestCase
{
/**
* @var ConfigurationController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Admin;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class DomainControllerTest extends TestCase
{
/**
* @var DomainController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Admin;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class HomeControllerTest extends TestCase
{
/**
* @var HomeController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Admin;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class UserControllerTest extends TestCase
{
/**
* @var UserController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class AttachmentControllerTest extends TestCase
{
/**
* @var AttachmentController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class ConfirmationControllerTest extends TestCase
{
/**
* @var ConfirmationController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:38.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:26.
*/
class ForgotPasswordControllerTest extends TestCase
{
/**
* @var ForgotPasswordController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class LoginControllerTest extends TestCase
{
/**
* @var LoginController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class PasswordControllerTest extends TestCase
{
/**
* @var PasswordController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class RegisterControllerTest extends TestCase
{
/**
* @var RegisterController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class ResetPasswordControllerTest extends TestCase
{
/**
* @var ResetPasswordController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class TwoFactorControllerTest extends TestCase
{
/**
* @var TwoFactorController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:27.
*/
class BillControllerTest extends TestCase
{
/**
* @var BillController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:39.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class BudgetControllerTest extends TestCase
{
/**
* @var BudgetController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class CategoryControllerTest extends TestCase
{
/**
* @var CategoryController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class AccountControllerTest extends TestCase
{
/**
* @var AccountController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class BillControllerTest extends TestCase
{
/**
* @var BillController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class BudgetControllerTest extends TestCase
{
/**
* @var BudgetController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class CategoryControllerTest extends TestCase
{
/**
* @var CategoryController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:40.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class CategoryReportControllerTest extends TestCase
{
/**
* @var CategoryReportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:28.
*/
class PiggyBankControllerTest extends TestCase
{
/**
* @var PiggyBankController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Chart;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class ReportControllerTest extends TestCase
{
/**
* @var ReportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class ControllerTest extends TestCase
{
/**
* @var Controller
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class CurrencyControllerTest extends TestCase
{
/**
* @var CurrencyController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class ExportControllerTest extends TestCase
{
/**
* @var ExportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class HelpControllerTest extends TestCase
{
/**
* @var HelpController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -30,19 +30,28 @@ class HomeControllerTest extends TestCase
'end' => '2012-04-01',
];
// if date range is > 50, should have flash.
$this->call('POST', '/daterange', $args);
$this->call('POST', route('daterange'), $args);
$this->assertResponseStatus(200);
$this->assertSessionHas('warning', '91 days of data may take a while to load.');
}
/**
* @covers FireflyIII\Http\Controllers\HomeController::displayError
*/
public function testDisplayError()
{
$this->be($this->user());
$this->call('GET', route('displayError'));
$this->assertResponseStatus(500);
}
/**
* @covers FireflyIII\Http\Controllers\HomeController::flush
*/
public function testFlush()
{
$this->be($this->user());
$this->call('GET', '/flush');
$this->call('GET', route('flush'));
$this->assertResponseStatus(302);
}
@@ -57,7 +66,35 @@ class HomeControllerTest extends TestCase
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('GET', '/');
$this->call('GET', route('index'));
$this->assertResponseStatus(200);
}
/**
* @covers FireflyIII\Http\Controllers\HomeController::routes
* @dataProvider dateRangeProvider
*
* @param string $range
*/
public function testRoutes(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('GET', route('allRoutes'));
$this->assertResponseStatus(200);
}
/**
* @covers FireflyIII\Http\Controllers\HomeController::testFlash
*/
public function testTestFlash()
{
$this->be($this->user());
$this->call('GET', route('testFlash'));
$this->assertResponseStatus(302);
$this->assertSessionHas('success');
$this->assertSessionHas('info');
$this->assertSessionHas('warning');
$this->assertSessionHas('error');
}
}

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:41.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class ImportControllerTest extends TestCase
{
/**
* @var ImportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class JsonControllerTest extends TestCase
{
/**
* @var JsonController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:29.
*/
class NewUserControllerTest extends TestCase
{
/**
* @var NewUserController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:30.
*/
class PiggyBankControllerTest extends TestCase
{
/**
* @var PiggyBankController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Popup;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:30.
*/
class ReportControllerTest extends TestCase
{
/**
* @var ReportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:31.
*/
class PreferencesControllerTest extends TestCase
{
/**
* @var PreferencesController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:31.
*/
class ProfileControllerTest extends TestCase
{
/**
* @var ProfileController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Report;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:42.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:31.
*/
class AccountControllerTest extends TestCase
{
/**
* @var AccountController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Report;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:32.
*/
class BalanceControllerTest extends TestCase
{
/**
* @var BalanceController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Report;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:32.
*/
class BudgetControllerTest extends TestCase
{
/**
* @var BudgetController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Report;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:32.
*/
class CategoryControllerTest extends TestCase
{
/**
* @var CategoryController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Report;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:32.
*/
class InOutControllerTest extends TestCase
{
/**
* @var InOutController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class ReportControllerTest extends TestCase
{
/**
* @var ReportController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class RuleControllerTest extends TestCase
{
/**
* @var RuleController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class RuleGroupControllerTest extends TestCase
{
/**
* @var RuleGroupController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:43.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class SearchControllerTest extends TestCase
{
/**
* @var SearchController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class TagControllerTest extends TestCase
{
/**
* @var TagController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Transaction;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:33.
*/
class ConvertControllerTest extends TestCase
{
/**
* @var ConvertController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Transaction;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:34.
*/
class MassControllerTest extends TestCase
{
/**
* @var MassController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Transaction;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:34.
*/
class SingleControllerTest extends TestCase
{
/**
* @var SingleController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -3,14 +3,12 @@ namespace Transaction;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:34.
*/
class SplitControllerTest extends TestCase
{
/**
* @var SplitController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.

View File

@@ -2,14 +2,12 @@
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-11-19 at 19:28:44.
* Generated by PHPUnit_SkeletonGenerator on 2016-11-20 at 06:10:34.
*/
class TransactionControllerTest extends TestCase
{
/**
* @var TransactionController
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.