mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
All kinds of new stuff for Codeception, which isn't working at ALL
This commit is contained in:
parent
dbc95dd878
commit
07610ae8fb
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ app/storage/firefly-export*
|
|||||||
firefly-iii-import-*.json
|
firefly-iii-import-*.json
|
||||||
|
|
||||||
tests/_output/*
|
tests/_output/*
|
||||||
|
testing.sqlite
|
||||||
|
12
app/config/homestead/cache.php
Normal file
12
app/config/homestead/cache.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path() . '/cache',
|
||||||
|
'connection' => null,
|
||||||
|
'table' => 'cache',
|
||||||
|
'memcached' => [
|
||||||
|
['host' => '127.0.0.1', 'port' => 11211, 'weight' => 100],
|
||||||
|
],
|
||||||
|
'prefix' => 'laravel',
|
||||||
|
];
|
2
app/config/testing/app.php
Normal file
2
app/config/testing/app.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
return ['log_level' => 'debug',];
|
@ -4,8 +4,9 @@ return [
|
|||||||
'connections' => [
|
'connections' => [
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
'database' => ':memory:',
|
'database' => 'tests/_data/testing.sqlite',
|
||||||
'prefix' => ''
|
'prefix' => ''
|
||||||
],
|
]
|
||||||
|
|
||||||
]
|
]
|
||||||
];
|
];
|
13
app/config/testing/mail.php
Normal file
13
app/config/testing/mail.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'driver' => 'smtp',
|
||||||
|
'host' => '',
|
||||||
|
'port' => 587,
|
||||||
|
'from' => ['address' => '', 'name' => 'Firefly III'],
|
||||||
|
'encryption' => 'tls',
|
||||||
|
'username' => '',
|
||||||
|
'password' => '',
|
||||||
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
'pretend' => true,
|
||||||
|
];
|
@ -32,6 +32,7 @@ class CreateTransactionCurrenciesTable extends Migration
|
|||||||
'transaction_currencies', function (Blueprint $table) {
|
'transaction_currencies', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
$table->string('code', 3);
|
$table->string('code', 3);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -8,7 +8,7 @@ class DefaultUserSeeder extends Seeder
|
|||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
DB::table('users')->delete();
|
DB::table('users')->delete();
|
||||||
if (App::environment() == 'homestead') {
|
if (App::environment() == 'testing') {
|
||||||
|
|
||||||
User::create(
|
User::create(
|
||||||
['email' => 'thegrumpydictator@gmail.com', 'password' => 'james', 'reset' => null, 'remember_token' => null, 'migrated' => 0]
|
['email' => 'thegrumpydictator@gmail.com', 'password' => 'james', 'reset' => null, 'remember_token' => null, 'migrated' => 0]
|
||||||
|
@ -7,7 +7,7 @@ class TestContentSeeder extends Seeder
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
if (App::environment() == 'homestead') {
|
if (App::environment() == 'testing') {
|
||||||
|
|
||||||
$assetType = AccountType::whereType('Asset account')->first();
|
$assetType = AccountType::whereType('Asset account')->first();
|
||||||
$expenseType = AccountType::whereType('Expense account')->first();
|
$expenseType = AccountType::whereType('Expense account')->first();
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
|
<!-- {{App::environment()}} -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
|
<!-- {{App::environment()}} -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -93,6 +93,7 @@ Event::subscribe('FireflyIII\Event\Budget');
|
|||||||
Event::subscribe('FireflyIII\Event\TransactionJournal');
|
Event::subscribe('FireflyIII\Event\TransactionJournal');
|
||||||
Event::subscribe('FireflyIII\Event\Transaction');
|
Event::subscribe('FireflyIII\Event\Transaction');
|
||||||
Event::subscribe('FireflyIII\Event\Account');
|
Event::subscribe('FireflyIII\Event\Account');
|
||||||
|
Event::subscribe('FireflyIII\Event\Event');
|
||||||
|
|
||||||
// event that creates a relationship between transaction journals and recurring events when created.
|
// event that creates a relationship between transaction journals and recurring events when created.
|
||||||
// event that updates the relationship between transaction journals and recurring events when edited.
|
// event that updates the relationship between transaction journals and recurring events when edited.
|
||||||
|
@ -11,7 +11,21 @@ settings:
|
|||||||
modules:
|
modules:
|
||||||
config:
|
config:
|
||||||
Db:
|
Db:
|
||||||
dsn: ''
|
dsn: 'sqlite:tests/_data/testing.sqlite'
|
||||||
user: ''
|
user: ''
|
||||||
password: ''
|
password: ''
|
||||||
dump: tests/_data/dump.sql
|
dump:
|
||||||
|
cleanup: false
|
||||||
|
populate: false
|
||||||
|
coverage:
|
||||||
|
enabled: true
|
||||||
|
whitelist:
|
||||||
|
include:
|
||||||
|
- app/*
|
||||||
|
exclude:
|
||||||
|
- app/storage/*
|
||||||
|
blacklist:
|
||||||
|
include:
|
||||||
|
- app/controllers/*
|
||||||
|
exclude:
|
||||||
|
- app/controllers/BaseController.php
|
@ -1,2 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
// This is global bootstrap for autoloading
|
// This is global bootstrap for autoloading
|
||||||
|
$db = realpath(__DIR__ . '/_data') . '/testing.sqlite';
|
||||||
|
|
||||||
|
if (!file_exists($db)) {
|
||||||
|
exec('touch ' . $db);
|
||||||
|
exec('php artisan migrate --seed --env=testing');
|
||||||
|
}
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/* Replace this file with actual dump of your database */
|
|
@ -11,4 +11,4 @@ modules:
|
|||||||
- AcceptanceHelper
|
- AcceptanceHelper
|
||||||
config:
|
config:
|
||||||
PhpBrowser:
|
PhpBrowser:
|
||||||
url: 'http://localhost/myapp/'
|
url: 'http://firefly.app/'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?php //[STAMP] 6d8b4518def1c0712832bc07010a0f73
|
<?php //[STAMP] 839413cdedfabfaf37368d4d42aaa8e6
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
// This class was automatically generated by build task
|
||||||
// You should not change it manually as it will be overwritten on next build
|
// You should not change it manually as it will be overwritten on next build
|
||||||
|
@ -6,4 +6,7 @@
|
|||||||
|
|
||||||
class_name: FunctionalTester
|
class_name: FunctionalTester
|
||||||
modules:
|
modules:
|
||||||
enabled: [Filesystem, FunctionalHelper]
|
enabled: [Db, Filesystem, FunctionalHelper, Laravel4]
|
||||||
|
config:
|
||||||
|
Laravel4:
|
||||||
|
environment: 'testing'
|
File diff suppressed because it is too large
Load Diff
3
tests/functional/LoginCept.php
Normal file
3
tests/functional/LoginCept.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
$I = new FunctionalTester($scenario);
|
||||||
|
$I->wantTo('perform actions and see result');
|
7
tests/functional/RegisterCept.php
Normal file
7
tests/functional/RegisterCept.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$I = new FunctionalTester($scenario);
|
||||||
|
$I->wantTo('register a new account');
|
||||||
|
$I->amOnPage('/register');
|
||||||
|
$I->submitForm('#register', ['email' => 'noreply@gmail.com']);
|
||||||
|
$I->see('Password sent!');
|
||||||
|
$I->seeInDatabase('users', ['email' => 'noreply@gmail.com']);
|
@ -1,4 +1,4 @@
|
|||||||
<?php //[STAMP] c03a19ab6ad087934a18d04c48d8412a
|
<?php //[STAMP] edd6266044f8995765e1218f33d26102
|
||||||
|
|
||||||
// This class was automatically generated by build task
|
// This class was automatically generated by build task
|
||||||
// You should not change it manually as it will be overwritten on next build
|
// You should not change it manually as it will be overwritten on next build
|
||||||
|
Loading…
Reference in New Issue
Block a user