mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Some new tests. Hope to have fixed the problem in hhvm.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class SearchController
|
class SearchController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@@ -159,6 +159,9 @@ Route::group(['before' => 'auth'], function () {
|
|||||||
// report controller:
|
// report controller:
|
||||||
Route::get('/reports',['uses' => 'ReportController@index','as' => 'reports.index']);
|
Route::get('/reports',['uses' => 'ReportController@index','as' => 'reports.index']);
|
||||||
|
|
||||||
|
// search controller:
|
||||||
|
Route::get('/search',['uses' => 'SearchController@index','as' => 'search']);
|
||||||
|
|
||||||
// transaction controller:
|
// transaction controller:
|
||||||
Route::get('/transactions/create/{what}', ['uses' => 'TransactionController@create', 'as' => 'transactions.create'])->where(['what' => 'withdrawal|deposit|transfer']);
|
Route::get('/transactions/create/{what}', ['uses' => 'TransactionController@create', 'as' => 'transactions.create'])->where(['what' => 'withdrawal|deposit|transfer']);
|
||||||
Route::get('/transaction/show/{tj}',['uses' => 'TransactionController@show','as' => 'transactions.show']);
|
Route::get('/transaction/show/{tj}',['uses' => 'TransactionController@show','as' => 'transactions.show']);
|
||||||
|
@@ -92,7 +92,7 @@ class ProfileControllerTest extends TestCase
|
|||||||
$this->_user->shouldReceive('getAttribute')->with('email')->andReturn('some@email');
|
$this->_user->shouldReceive('getAttribute')->with('email')->andReturn('some@email');
|
||||||
$this->_user->shouldReceive('getAttribute')->with('password')->andReturn('Blablabla');
|
$this->_user->shouldReceive('getAttribute')->with('password')->andReturn('Blablabla');
|
||||||
|
|
||||||
$this->action('POST', 'ProfileController@postChangePassword');
|
$this->action('POST', 'ProfileController@postChangePassword',['old' => '']);
|
||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
27
app/tests/controllers/SearchControllerTest.php
Normal file
27
app/tests/controllers/SearchControllerTest.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
use Mockery as m;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class SearchControllerTest
|
||||||
|
*/
|
||||||
|
class SearchControllerTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown()
|
||||||
|
{
|
||||||
|
m::close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testIndex()
|
||||||
|
{
|
||||||
|
$this->action('GET', 'SearchController@index');
|
||||||
|
$this->assertResponseOk();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user