mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Removed test code after upgrading to laravel 5.2 (will have to reinstate).
This commit is contained in:
parent
78a7b995d2
commit
4b00db7662
40
tests/TestCase.php
Normal file → Executable file
40
tests/TestCase.php
Normal file → Executable file
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class TestCase
|
||||
*/
|
||||
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
/**
|
||||
* The base URL to use while testing the application.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $baseUrl = 'http://localhost';
|
||||
|
||||
/**
|
||||
@ -14,38 +16,10 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called before the first test of this test class is run.
|
||||
*
|
||||
* @since Method available since Release 3.4.0
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Inherited Methods
|
||||
* @method void wantToTest($text)
|
||||
* @method void wantTo($text)
|
||||
* @method void execute($callable)
|
||||
* @method void expectTo($prediction)
|
||||
* @method void expect($prediction)
|
||||
* @method void amGoingTo($argumentation)
|
||||
* @method void am($role)
|
||||
* @method void lookForwardTo($achieveValue)
|
||||
* @method void comment($description)
|
||||
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class FunctionalTester extends \Codeception\Actor
|
||||
{
|
||||
use _generated\FunctionalTesterActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
/**
|
||||
* Class Functional
|
||||
*
|
||||
* @package Helper
|
||||
*/
|
||||
class Functional extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
// here you can define custom actions
|
||||
// all public methods declared in helper class will be available in $I
|
||||
|
||||
/**
|
||||
* Class Unit
|
||||
*
|
||||
* @package Helper
|
||||
*/
|
||||
class Unit extends \Codeception\Module
|
||||
{
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* Inherited Methods
|
||||
* @method void wantToTest($text)
|
||||
* @method void wantTo($text)
|
||||
* @method void execute($callable)
|
||||
* @method void expectTo($prediction)
|
||||
* @method void expect($prediction)
|
||||
* @method void amGoingTo($argumentation)
|
||||
* @method void am($role)
|
||||
* @method void lookForwardTo($achieveValue)
|
||||
* @method void comment($description)
|
||||
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
|
||||
*
|
||||
* @SuppressWarnings(PHPMD)
|
||||
*/
|
||||
class UnitTester extends \Codeception\Actor
|
||||
{
|
||||
use _generated\UnitTesterActions;
|
||||
|
||||
/**
|
||||
* Define custom actions here
|
||||
*/
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php //[STAMP] 65f4e005f3be69d169e0f598e3c24741
|
||||
namespace _generated;
|
||||
|
||||
// This class was automatically generated by build task
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
use Helper\Functional;
|
||||
|
||||
/**
|
||||
* Class FunctionalTesterActions
|
||||
*
|
||||
* @package _generated
|
||||
*/
|
||||
trait FunctionalTesterActions
|
||||
{
|
||||
/**
|
||||
* @return \Codeception\Scenario
|
||||
*/
|
||||
abstract protected function getScenario();
|
||||
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +0,0 @@
|
||||
# Codeception Test Suite Configuration
|
||||
#
|
||||
# Suite for functional (integration) tests
|
||||
# Emulate web requests and make application process them
|
||||
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it
|
||||
|
||||
class_name: FunctionalTester
|
||||
modules:
|
||||
enabled:
|
||||
# add framework module here
|
||||
- \Helper\Functional
|
@ -1,10 +0,0 @@
|
||||
# Codeception Test Suite Configuration
|
||||
#
|
||||
# Suite for unit (internal) tests.
|
||||
|
||||
class_name: UnitTester
|
||||
modules:
|
||||
enabled:
|
||||
- Laravel5
|
||||
- Asserts
|
||||
- \Helper\Unit
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace FireflyIII\Models;
|
||||
|
||||
use TestCase;
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user