Skip to content

Firefly III: a personal finances manager

Reinstated test files.

James Cole4a2768f8d1cd
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 @@
+<?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);
+ }
+}
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 @@
+<?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());
+ }
+}