@@ -22,8 +22,11 @@ final class OrderPartsPreparation
|
||||
$isolated = ($db->getDriverName() === 'sqlite' && $db->getDatabaseName() === ':memory:')
|
||||
|| ($db->getDriverName() === 'pgsql' && preg_match('/^compras_receipts_test_[a-f0-9]{12}$/D', $db->getDatabaseName()));
|
||||
$runtime = new \ReflectionClass(BudgetControl::class);
|
||||
$available = app(StandaloneRuntime::class)->enabled()
|
||||
? app(StandaloneRuntime::class)->feature('order-parts', $db)
|
||||
: config('order-parts.qa_enabled') === true && app()->environment('testing') && $isolated;
|
||||
|
||||
return config('order-parts.qa_enabled') === true && app()->environment('testing') && $isolated
|
||||
return $available
|
||||
&& $runtime->hasMethod('commitOrderParts') && $runtime->hasConstant('ORDER_PARTS_VERSION')
|
||||
&& $runtime->getConstant('ORDER_PARTS_VERSION') === CommonBudget::ORDER_PARTS_CONTRACT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user