mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-27 01:11:37 -06:00
Removed some phpstorm marks, updated json controller.
This commit is contained in:
parent
905e590c12
commit
f792c7add7
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sander
|
||||
* Date: 27/07/14
|
||||
* Time: 16:28
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Controllers;
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: User
|
||||
* Date: 30-7-14
|
||||
* Time: 10:57
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Controllers;
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: User
|
||||
* Date: 30-7-14
|
||||
* Time: 10:57
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Controllers;
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: User
|
||||
* Date: 29-7-14
|
||||
* Time: 10:41
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Controllers;
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: User
|
||||
* Date: 29-7-14
|
||||
* Time: 10:42
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Controllers;
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sander
|
||||
* Date: 25/07/14
|
||||
* Time: 21:04
|
||||
*/
|
||||
|
||||
namespace Firefly\Helper\Form;
|
||||
|
||||
|
41
app/tests/controllers/JsonControllerTest.php
Normal file
41
app/tests/controllers/JsonControllerTest.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
use Zizaco\FactoryMuff\Facade\FactoryMuff as f;
|
||||
/**
|
||||
* Class JsonControllerTest
|
||||
*/
|
||||
class JsonControllerTest extends TestCase
|
||||
{
|
||||
protected $_accounts;
|
||||
protected $_categories;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
Artisan::call('migrate');
|
||||
Artisan::call('db:seed');
|
||||
$this->_accounts = $this->mock('Firefly\Storage\Account\AccountRepositoryInterface');
|
||||
$this->_categories = $this->mock('Firefly\Storage\Category\CategoryRepositoryInterface');
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
Mockery::close();
|
||||
}
|
||||
|
||||
public function testBeneficiaries()
|
||||
{
|
||||
$beneficiary = f::create('Account');
|
||||
|
||||
$this->_accounts->shouldReceive('getBeneficiaries')->once()->andReturn([$beneficiary]);
|
||||
$this->action('GET', 'JsonController@beneficiaries');
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
|
||||
public function testCategories()
|
||||
{
|
||||
$category = f::create('Category');
|
||||
$this->_categories->shouldReceive('get')->once()->andReturn([$category]);
|
||||
$this->action('GET', 'JsonController@categories');
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user