mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Updated tests.
This commit is contained in:
@@ -15,145 +15,153 @@ class BudgetControllerTest extends TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::amount
|
* @covers FireflyIII\Http\Controllers\BudgetController::amount
|
||||||
* @todo Implement testAmount().
|
|
||||||
*/
|
*/
|
||||||
public function testAmount()
|
public function testAmount()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$args = [
|
||||||
$this->markTestIncomplete(
|
'amount' => 1200,
|
||||||
'This test has not been implemented yet.'
|
'_token' => Session::token(),
|
||||||
);
|
];
|
||||||
|
$this->be($this->user());
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/budgets/amount/1', $args);
|
||||||
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::create
|
* @covers FireflyIII\Http\Controllers\BudgetController::create
|
||||||
* @todo Implement testCreate().
|
|
||||||
*/
|
*/
|
||||||
public function testCreate()
|
public function testCreate()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/create');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::delete
|
* @covers FireflyIII\Http\Controllers\BudgetController::delete
|
||||||
* @todo Implement testDelete().
|
|
||||||
*/
|
*/
|
||||||
public function testDelete()
|
public function testDelete()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/delete/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::destroy
|
* @covers FireflyIII\Http\Controllers\BudgetController::destroy
|
||||||
* @todo Implement testDestroy().
|
|
||||||
*/
|
*/
|
||||||
public function testDestroy()
|
public function testDestroy()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->session(['budgets.delete.url' => 'http://localhost']);
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/budgets/destroy/2', $args);
|
||||||
|
$this->assertSessionHas('success');
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::edit
|
* @covers FireflyIII\Http\Controllers\BudgetController::edit
|
||||||
* @todo Implement testEdit().
|
|
||||||
*/
|
*/
|
||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/edit/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::index
|
* @covers FireflyIII\Http\Controllers\BudgetController::index
|
||||||
* @todo Implement testIndex().
|
|
||||||
*/
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget
|
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget
|
||||||
* @todo Implement testNoBudget().
|
|
||||||
*/
|
*/
|
||||||
public function testNoBudget()
|
public function testNoBudget()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/list/noBudget');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
|
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
|
||||||
* @todo Implement testPostUpdateIncome().
|
|
||||||
*/
|
*/
|
||||||
public function testPostUpdateIncome()
|
public function testPostUpdateIncome()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$args = [
|
||||||
$this->markTestIncomplete(
|
'amount' => 1200,
|
||||||
'This test has not been implemented yet.'
|
'_token' => Session::token(),
|
||||||
);
|
];
|
||||||
|
$this->be($this->user());
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/budgets/income', $args);
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
* @covers FireflyIII\Http\Controllers\BudgetController::show
|
||||||
* @todo Implement testShow().
|
|
||||||
*/
|
*/
|
||||||
public function testShow()
|
public function testShow()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/show/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::store
|
* @covers FireflyIII\Http\Controllers\BudgetController::store
|
||||||
* @todo Implement testStore().
|
|
||||||
*/
|
*/
|
||||||
public function testStore()
|
public function testStore()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$this->session(['budgets.create.url' => 'http://localhost']);
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
'name' => 'Some kind of test budget.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/budgets/store', $args);
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::update
|
* @covers FireflyIII\Http\Controllers\BudgetController::update
|
||||||
* @todo Implement testUpdate().
|
|
||||||
*/
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$this->session(['budgets.edit.url' => 'http://localhost']);
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
'name' => 'Some kind of test budget.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/budgets/update/1', $args);
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
|
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
|
||||||
* @todo Implement testUpdateIncome().
|
|
||||||
*/
|
*/
|
||||||
public function testUpdateIncome()
|
public function testUpdateIncome()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/budgets/income');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,121 +16,124 @@ class CategoryControllerTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::create
|
* @covers FireflyIII\Http\Controllers\CategoryController::create
|
||||||
* @todo Implement testCreate().
|
|
||||||
*/
|
*/
|
||||||
public function testCreate()
|
public function testCreate()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/create');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::delete
|
* @covers FireflyIII\Http\Controllers\CategoryController::delete
|
||||||
* @todo Implement testDelete().
|
|
||||||
*/
|
*/
|
||||||
public function testDelete()
|
public function testDelete()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/delete/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::destroy
|
* @covers FireflyIII\Http\Controllers\CategoryController::destroy
|
||||||
* @todo Implement testDestroy().
|
|
||||||
*/
|
*/
|
||||||
public function testDestroy()
|
public function testDestroy()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->session(['categories.delete.url' => 'http://localhost']);
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/categories/destroy/2', $args);
|
||||||
|
$this->assertSessionHas('success');
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::edit
|
* @covers FireflyIII\Http\Controllers\CategoryController::edit
|
||||||
* @todo Implement testEdit().
|
|
||||||
*/
|
*/
|
||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/edit/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::index
|
* @covers FireflyIII\Http\Controllers\CategoryController::index
|
||||||
* @todo Implement testIndex().
|
|
||||||
*/
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory
|
* @covers FireflyIII\Http\Controllers\CategoryController::noCategory
|
||||||
* @todo Implement testNoCategory().
|
|
||||||
*/
|
*/
|
||||||
public function testNoCategory()
|
public function testNoCategory()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/list/noCategory');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::show
|
* @covers FireflyIII\Http\Controllers\CategoryController::show
|
||||||
* @todo Implement testShow().
|
|
||||||
*/
|
*/
|
||||||
public function testShow()
|
public function testShow()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/show/1');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::showWithDate
|
* @covers FireflyIII\Http\Controllers\CategoryController::showWithDate
|
||||||
* @todo Implement testShowWithDate().
|
|
||||||
*/
|
*/
|
||||||
public function testShowWithDate()
|
public function testShowWithDate()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$response = $this->call('GET', '/categories/show/1/20150101');
|
||||||
'This test has not been implemented yet.'
|
$this->assertEquals(200, $response->status());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::store
|
* @covers FireflyIII\Http\Controllers\CategoryController::store
|
||||||
* @todo Implement testStore().
|
|
||||||
*/
|
*/
|
||||||
public function testStore()
|
public function testStore()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$this->session(['categories.create.url' => 'http://localhost']);
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
'name' => 'Some kind of test cat.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/categories/store', $args);
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Http\Controllers\CategoryController::update
|
* @covers FireflyIII\Http\Controllers\CategoryController::update
|
||||||
* @todo Implement testUpdate().
|
|
||||||
*/
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
// Remove the following lines when you implement this test.
|
$this->be($this->user());
|
||||||
$this->markTestIncomplete(
|
$this->session(['categories.edit.url' => 'http://localhost']);
|
||||||
'This test has not been implemented yet.'
|
$args = [
|
||||||
);
|
'_token' => Session::token(),
|
||||||
|
'name' => 'Some kind of test category.',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->call('POST', '/categories/update/1', $args);
|
||||||
|
$this->assertEquals(302, $response->status());
|
||||||
|
$this->assertSessionHas('success');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* ControllerTest.php
|
|
||||||
* Copyright (C) 2016 Sander Dorigo
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms
|
|
||||||
* of the MIT license. See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:39:27.
|
|
||||||
*/
|
|
||||||
class ControllerTest extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @covers FireflyIII\Http\Controllers\Controller::authorize
|
|
||||||
* @todo Implement testAuthorize().
|
|
||||||
*/
|
|
||||||
public function testAuthorize()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers FireflyIII\Http\Controllers\Controller::authorizeForUser
|
|
||||||
* @todo Implement testAuthorizeForUser().
|
|
||||||
*/
|
|
||||||
public function testAuthorizeForUser()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers FireflyIII\Http\Controllers\Controller::validate
|
|
||||||
* @todo Implement testValidate().
|
|
||||||
*/
|
|
||||||
public function testValidate()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers FireflyIII\Http\Controllers\Controller::validateWithBag
|
|
||||||
* @todo Implement testValidateWithBag().
|
|
||||||
*/
|
|
||||||
public function testValidateWithBag()
|
|
||||||
{
|
|
||||||
// Remove the following lines when you implement this test.
|
|
||||||
$this->markTestIncomplete(
|
|
||||||
'This test has not been implemented yet.'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user