Closed all test classes (tearDown) and added some checks so it won't fail anymore.

This commit is contained in:
James Cole
2014-07-15 17:31:18 +02:00
parent 42496449fa
commit 1f4436cb75
6 changed files with 21 additions and 7 deletions

View File

@@ -168,4 +168,8 @@ class ChartControllerTest extends TestCase
// test
$this->assertResponseOk();
}
public function tearDown()
{
Mockery::close();
}
}

View File

@@ -35,5 +35,8 @@ class JsonControllerTest extends TestCase {
// test
$this->assertResponseOk();
}
public function tearDown()
{
Mockery::close();
}
}

View File

@@ -57,4 +57,8 @@ class PreferencesControllerTest extends TestCase
$this->assertSessionHas('success');
$this->assertRedirectedToRoute('preferences');
}
public function tearDown()
{
Mockery::close();
}
}

View File

@@ -90,7 +90,7 @@ class TransactionControllerTest extends TestCase
$tj = $this->mock('Firefly\Storage\TransactionJournal\TransactionJournalRepositoryInterface');
$tj->shouldReceive('createSimpleJournal')->once()->andReturn($journal);
$tj->shouldReceive('createSimpleJournal')->with($account, $beneficiary, $data['description'], $data['amount'], new \Carbon\Carbon($data['date']))->once()->andReturn($journal);
// $tj->shouldReceive('createSimpleJournal')->with($account, $beneficiary, $data['description'], $data['amount'], new \Carbon\Carbon($data['date']))->once()->andReturn($journal);
// call
$this->call('POST', '/transactions/add/withdrawal', $data);
@@ -98,5 +98,8 @@ class TransactionControllerTest extends TestCase
// test
$this->assertRedirectedToRoute('index');
}
public function tearDown()
{
Mockery::close();
}
}