mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Push updated tests.
This commit is contained in:
@@ -167,9 +167,9 @@ class LinkControllerTest extends TestCase
|
||||
{
|
||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||
$data = [
|
||||
'name' => 'test ' . rand(1, 1000),
|
||||
'inward' => 'test inward' . rand(1, 1000),
|
||||
'outward' => 'test outward' . rand(1, 1000),
|
||||
'name' => 'test ' . random_int(1, 1000),
|
||||
'inward' => 'test inward' . random_int(1, 1000),
|
||||
'outward' => 'test outward' . random_int(1, 1000),
|
||||
];
|
||||
$repository->shouldReceive('store')->once()->andReturn(LinkType::first());
|
||||
$repository->shouldReceive('find')->andReturn(LinkType::first());
|
||||
@@ -189,9 +189,9 @@ class LinkControllerTest extends TestCase
|
||||
{
|
||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||
$data = [
|
||||
'name' => 'test ' . rand(1, 1000),
|
||||
'inward' => 'test inward' . rand(1, 1000),
|
||||
'outward' => 'test outward' . rand(1, 1000),
|
||||
'name' => 'test ' . random_int(1, 1000),
|
||||
'inward' => 'test inward' . random_int(1, 1000),
|
||||
'outward' => 'test outward' . random_int(1, 1000),
|
||||
'create_another' => '1',
|
||||
];
|
||||
$repository->shouldReceive('store')->once()->andReturn(new LinkType);
|
||||
@@ -215,9 +215,9 @@ class LinkControllerTest extends TestCase
|
||||
$repository->shouldReceive('update')->once()->andReturn(new $linkType);
|
||||
|
||||
$data = [
|
||||
'name' => 'test ' . rand(1, 1000),
|
||||
'inward' => 'test inward' . rand(1, 1000),
|
||||
'outward' => 'test outward' . rand(1, 1000),
|
||||
'name' => 'test ' . random_int(1, 1000),
|
||||
'inward' => 'test inward' . random_int(1, 1000),
|
||||
'outward' => 'test outward' . random_int(1, 1000),
|
||||
];
|
||||
$this->session(['link_types.edit.uri' => 'http://localhost']);
|
||||
$this->be($this->user());
|
||||
@@ -236,9 +236,9 @@ class LinkControllerTest extends TestCase
|
||||
$linkType = LinkType::where('editable', 0)->first();
|
||||
|
||||
$data = [
|
||||
'name' => 'test ' . rand(1, 1000),
|
||||
'inward' => 'test inward' . rand(1, 1000),
|
||||
'outward' => 'test outward' . rand(1, 1000),
|
||||
'name' => 'test ' . random_int(1, 1000),
|
||||
'inward' => 'test inward' . random_int(1, 1000),
|
||||
'outward' => 'test outward' . random_int(1, 1000),
|
||||
'return_to_edit' => '1',
|
||||
];
|
||||
$this->session(['link_types.edit.uri' => 'http://localhost']);
|
||||
@@ -259,9 +259,9 @@ class LinkControllerTest extends TestCase
|
||||
$linkType = LinkType::create(['editable' => 1, 'inward' => 'healox', 'outward' => 'byaex', 'name' => 'Test tyapeX']);
|
||||
|
||||
$data = [
|
||||
'name' => 'test ' . rand(1, 1000),
|
||||
'inward' => 'test inward' . rand(1, 1000),
|
||||
'outward' => 'test outward' . rand(1, 1000),
|
||||
'name' => 'test ' . random_int(1, 1000),
|
||||
'inward' => 'test inward' . random_int(1, 1000),
|
||||
'outward' => 'test outward' . random_int(1, 1000),
|
||||
'return_to_edit' => '1',
|
||||
];
|
||||
$repository->shouldReceive('update')->once()->andReturn(new $linkType);
|
||||
|
||||
Reference in New Issue
Block a user