mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-25 08:21:08 -06:00
All kinds of new stuff for Codeception, which isn't working at ALL
This commit is contained in:
parent
dbc95dd878
commit
07610ae8fb
3
.gitignore
vendored
3
.gitignore
vendored
@ -15,4 +15,5 @@ app/storage/firefly-export*
|
||||
.vagrant
|
||||
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' => [
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'database' => ':memory:',
|
||||
'database' => 'tests/_data/testing.sqlite',
|
||||
'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) {
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('code', 3);
|
||||
}
|
||||
);
|
||||
|
@ -8,7 +8,7 @@ class DefaultUserSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
DB::table('users')->delete();
|
||||
if (App::environment() == 'homestead') {
|
||||
if (App::environment() == 'testing') {
|
||||
|
||||
User::create(
|
||||
['email' => 'thegrumpydictator@gmail.com', 'password' => 'james', 'reset' => null, 'remember_token' => null, 'migrated' => 0]
|
||||
|
@ -7,7 +7,7 @@ class TestContentSeeder extends Seeder
|
||||
|
||||
public function run()
|
||||
{
|
||||
if (App::environment() == 'homestead') {
|
||||
if (App::environment() == 'testing') {
|
||||
|
||||
$assetType = AccountType::whereType('Asset 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/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- {{App::environment()}} -->
|
||||
</head>
|
||||
<body>
|
||||
<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/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- {{App::environment()}} -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
@ -93,6 +93,7 @@ Event::subscribe('FireflyIII\Event\Budget');
|
||||
Event::subscribe('FireflyIII\Event\TransactionJournal');
|
||||
Event::subscribe('FireflyIII\Event\Transaction');
|
||||
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 updates the relationship between transaction journals and recurring events when edited.
|
||||
|
@ -9,9 +9,23 @@ settings:
|
||||
colors: true
|
||||
memory_limit: 1024M
|
||||
modules:
|
||||
config:
|
||||
Db:
|
||||
dsn: ''
|
||||
user: ''
|
||||
password: ''
|
||||
dump: tests/_data/dump.sql
|
||||
config:
|
||||
Db:
|
||||
dsn: 'sqlite:tests/_data/testing.sqlite'
|
||||
user: ''
|
||||
password: ''
|
||||
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
|
||||
// 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
|
||||
config:
|
||||
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
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
|
@ -6,4 +6,7 @@
|
||||
|
||||
class_name: FunctionalTester
|
||||
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
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
|
Loading…
Reference in New Issue
Block a user