mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-18 00:53:10 +01:00
Fix for travis tests
This commit is contained in:
parent
9d1c49ff14
commit
2fcb1d66a5
@ -45,7 +45,8 @@ before_script:
|
||||
- php artisan key:generate --no-interaction
|
||||
- sed -i 's/APP_ENV=production/APP_ENV=development/g' .env
|
||||
- sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env
|
||||
- sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env
|
||||
- sed -i '$a NINJA_DEV=true' .env
|
||||
- sed -i '$a TRAVIS=true' .env
|
||||
# create the database and user
|
||||
- mysql -u root -e "create database IF NOT EXISTS ninja;"
|
||||
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
||||
|
@ -39,7 +39,7 @@ class Handler extends ExceptionHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Utils::isNinja()) {
|
||||
if (Utils::isNinja() && ! Utils::isTravis()) {
|
||||
Utils::logError(Utils::getErrorString($e));
|
||||
return false;
|
||||
} else {
|
||||
|
@ -51,6 +51,11 @@ class Utils
|
||||
return php_sapi_name() == 'cli';
|
||||
}
|
||||
|
||||
public static function isTravis()
|
||||
{
|
||||
return env('TRAVIS') == 'true';
|
||||
}
|
||||
|
||||
public static function isNinja()
|
||||
{
|
||||
return self::isNinjaProd() || self::isNinjaDev();
|
||||
|
@ -7,7 +7,7 @@ class ProductTransformer extends EntityTransformer
|
||||
{
|
||||
public function transform(Product $product)
|
||||
{
|
||||
return array_merge($this->getDefaults(), [
|
||||
return array_merge($this->getDefaults($product), [
|
||||
'id' => (int) $product->public_id,
|
||||
'product_key' => $product->product_key,
|
||||
'notes' => $product->notes,
|
||||
|
Loading…
Reference in New Issue
Block a user