mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-03 20:55:05 +00:00 
			
		
		
		
	Reinstated test files.
This commit is contained in:
		
							
								
								
									
										18
									
								
								tests/BasicTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								tests/BasicTest.php
									
									
									
									
									
										Normal 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);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										41
									
								
								tests/unit/Models/TransactionTypeTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								tests/unit/Models/TransactionTypeTest.php
									
									
									
									
									
										Normal 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());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user