mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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
|
- php artisan key:generate --no-interaction
|
||||||
- sed -i 's/APP_ENV=production/APP_ENV=development/g' .env
|
- 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/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
|
# create the database and user
|
||||||
- mysql -u root -e "create database IF NOT EXISTS ninja;"
|
- 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;"
|
- 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils::isNinja()) {
|
if (Utils::isNinja() && ! Utils::isTravis()) {
|
||||||
Utils::logError(Utils::getErrorString($e));
|
Utils::logError(Utils::getErrorString($e));
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -51,6 +51,11 @@ class Utils
|
|||||||
return php_sapi_name() == 'cli';
|
return php_sapi_name() == 'cli';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function isTravis()
|
||||||
|
{
|
||||||
|
return env('TRAVIS') == 'true';
|
||||||
|
}
|
||||||
|
|
||||||
public static function isNinja()
|
public static function isNinja()
|
||||||
{
|
{
|
||||||
return self::isNinjaProd() || self::isNinjaDev();
|
return self::isNinjaProd() || self::isNinjaDev();
|
||||||
|
@ -7,7 +7,7 @@ class ProductTransformer extends EntityTransformer
|
|||||||
{
|
{
|
||||||
public function transform(Product $product)
|
public function transform(Product $product)
|
||||||
{
|
{
|
||||||
return array_merge($this->getDefaults(), [
|
return array_merge($this->getDefaults($product), [
|
||||||
'id' => (int) $product->public_id,
|
'id' => (int) $product->public_id,
|
||||||
'product_key' => $product->product_key,
|
'product_key' => $product->product_key,
|
||||||
'notes' => $product->notes,
|
'notes' => $product->notes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user