mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
missed some small spots in https://github.com/opnsense/core/issues/4012
o one syslog unwrapped o testsuite return class path missing
This commit is contained in:
parent
e70427d9de
commit
001325988c
@ -31,6 +31,7 @@ namespace OPNsense\Base;
|
||||
use Exception;
|
||||
use OPNsense\Base\FieldTypes\ContainerField;
|
||||
use OPNsense\Core\Config;
|
||||
use Phalcon\Logger;
|
||||
use Phalcon\Logger\Adapter\Syslog;
|
||||
use Phalcon\Validation;
|
||||
use Phalcon\Messages\Messages;
|
||||
@ -553,10 +554,12 @@ abstract class BaseModel
|
||||
public function serializeToConfig($validateFullModel = false, $disable_validation = false)
|
||||
{
|
||||
// create logger to save possible consistency issues to
|
||||
$logger = new Syslog("config", array(
|
||||
'option' => LOG_PID,
|
||||
'facility' => LOG_LOCAL2
|
||||
));
|
||||
$logger = new Logger(
|
||||
'messages',
|
||||
[
|
||||
'main' => new Syslog("config", ['option' => LOG_PID, 'facility' => LOG_LOCAL2])
|
||||
]
|
||||
);
|
||||
|
||||
// Perform validation, collect all messages and raise exception if validation is not disabled.
|
||||
// If for some reason the developer chooses to ignore the errors, let's at least log there something
|
||||
|
||||
@ -99,7 +99,7 @@ class ModelRelationFieldTest extends Field_Framework_TestCase
|
||||
));
|
||||
$field->eventPostLoading();
|
||||
$field->setValue("XX5ea2a35c-b02b-485a-912b-d077e639bf9f");
|
||||
$this->assertEquals($this->validate($field), ['InclusionIn']);
|
||||
$this->assertEquals($this->validate($field), ['Phalcon\Validation\Validator\InclusionIn']);
|
||||
}
|
||||
|
||||
public function testSetMultiOk()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user