Reinstated test files.

This commit is contained in:
James Cole 2016-01-09 09:56:41 +01:00
parent 05f8773fa0
commit 4a2768f8d1
2 changed files with 59 additions and 0 deletions

18
tests/BasicTest.php Normal file
View File

@ -0,0 +1,18 @@
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class BasicTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testExample()
{
$this->assertTrue(true);
}
}

View File

@ -0,0 +1,41 @@
<?php
/**
* TransactionTypeTest.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.
*/
use FireflyIII\Models\TransactionType;
/**
* Class TransactionTypeTest
*/
class TransactionTypeTest extends TestCase
{
public function testIsWithdrawal()
{
$transactionType = TransactionType::whereType(TransactionType::WITHDRAWAL)->first();
$this->assertTrue($transactionType->isWithdrawal());
}
public function testIsDeposit()
{
$transactionType = TransactionType::whereType(TransactionType::DEPOSIT)->first();
$this->assertTrue($transactionType->isDeposit());
}
public function testIsTransfer()
{
$transactionType = TransactionType::whereType(TransactionType::TRANSFER)->first();
$this->assertTrue($transactionType->isTransfer());
}
public function testIsOpeningBalance()
{
$transactionType = TransactionType::whereType(TransactionType::OPENING_BALANCE)->first();
$this->assertTrue($transactionType->isOpeningBalance());
}
}