- All models now extend a generic Model class that extends Sudzy - Wrote tests for Subscriber and Setting model validation - Rewrote model tests to make sure they look the same - Updated both tests with cleanup logic in the beginning - Added test:unit-single method to Robo for selective unit testing Closes #54
19 lines
341 B
PHP
19 lines
341 B
PHP
<?php namespace MailPoet\Models;
|
|
|
|
class CustomValidator {
|
|
|
|
function __construct() {
|
|
$this->validator = new \Sudzy\Engine();
|
|
}
|
|
|
|
function init() {
|
|
$this->validator->addValidator(
|
|
'isString',
|
|
function ($val) {
|
|
return is_string($val);
|
|
}
|
|
);
|
|
|
|
return $this->validator;
|
|
}
|
|
} |