From 4a2768f8d1cdc43e6f00ac763a674459d4fb0ebc Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 9 Jan 2016 09:56:41 +0100 Subject: [PATCH] Reinstated test files. --- tests/BasicTest.php | 18 ++++++++++ tests/unit/Models/TransactionTypeTest.php | 41 +++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 tests/BasicTest.php create mode 100644 tests/unit/Models/TransactionTypeTest.php diff --git a/tests/BasicTest.php b/tests/BasicTest.php new file mode 100644 index 0000000000..0f1b9f46d4 --- /dev/null +++ b/tests/BasicTest.php @@ -0,0 +1,18 @@ +assertTrue(true); + } +} diff --git a/tests/unit/Models/TransactionTypeTest.php b/tests/unit/Models/TransactionTypeTest.php new file mode 100644 index 0000000000..0a0daedcb9 --- /dev/null +++ b/tests/unit/Models/TransactionTypeTest.php @@ -0,0 +1,41 @@ +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()); + } +}