1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Working on tests

This commit is contained in:
Hillel Coren 2017-11-14 13:24:33 +02:00
parent 5fb8429c86
commit 3662bb11b0
2 changed files with 4 additions and 2 deletions

View File

@ -75,9 +75,9 @@ before_script:
script: script:
#- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php - php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ExpenseCest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance ExpenseCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php

View File

@ -191,6 +191,7 @@ class StartupCheck
Session::flash('message', 'Cache cleared'); Session::flash('message', 'Cache cleared');
} }
foreach ($cachedTables as $name => $class) { foreach ($cachedTables as $name => $class) {
\Log::info("Cache for {$name} is " . (Cache::has($name) ? 'SET' : 'NOT SET'));
if (Input::has('clear_cache') || ! Cache::has($name)) { if (Input::has('clear_cache') || ! Cache::has($name)) {
// check that the table exists in case the migration is pending // check that the table exists in case the migration is pending
if (! Schema::hasTable((new $class())->getTable())) { if (! Schema::hasTable((new $class())->getTable())) {
@ -207,6 +208,7 @@ class StartupCheck
} }
$tableData = $class::orderBy($orderBy)->get(); $tableData = $class::orderBy($orderBy)->get();
if (count($tableData)) { if (count($tableData)) {
\Log::info("Setting cache for {$name}");
Cache::forever($name, $tableData); Cache::forever($name, $tableData);
} }
} }