- Renamed Model to BaseModel (make it clear)
- Updated RoboFile to compile assets or else tests break
This commit is contained in:
@ -73,12 +73,14 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
|
|
||||||
function testUnit($singleUnit = null) {
|
function testUnit($singleUnit = null) {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
|
$this->compileAll();
|
||||||
$this->_exec('vendor/bin/codecept build');
|
$this->_exec('vendor/bin/codecept build');
|
||||||
$this->_exec('vendor/bin/codecept run unit ' . (($singleUnit) ? $singleUnit : ''));
|
$this->_exec('vendor/bin/codecept run unit ' . (($singleUnit) ? $singleUnit : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAcceptance() {
|
function testAcceptance() {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
|
$this->compileAll();
|
||||||
$this->_exec('vendor/bin/codecept build');
|
$this->_exec('vendor/bin/codecept build');
|
||||||
$this
|
$this
|
||||||
->taskExec('phantomjs --webdriver=4444')
|
->taskExec('phantomjs --webdriver=4444')
|
||||||
|
@ -3,7 +3,7 @@ namespace MailPoet\Models;
|
|||||||
|
|
||||||
if (!defined('ABSPATH')) exit;
|
if (!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class Model extends \Sudzy\ValidModel {
|
class BaseModel extends \Sudzy\ValidModel {
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$customValidators = new CustomValidator();
|
$customValidators = new CustomValidator();
|
||||||
parent::__construct($customValidators->init());
|
parent::__construct($customValidators->init());
|
@ -3,7 +3,7 @@ namespace MailPoet\Models;
|
|||||||
|
|
||||||
if (!defined('ABSPATH')) exit;
|
if (!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class Newsletter extends Model {
|
class Newsletter extends BaseModel {
|
||||||
public static $_table = MP_NEWSLETTERS_TABLE;
|
public static $_table = MP_NEWSLETTERS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
@ -3,7 +3,7 @@ namespace MailPoet\Models;
|
|||||||
|
|
||||||
if (!defined('ABSPATH')) exit;
|
if (!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class Setting extends Model {
|
class Setting extends BaseModel {
|
||||||
public static $_table = MP_SETTINGS_TABLE;
|
public static $_table = MP_SETTINGS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
@ -3,7 +3,7 @@ namespace MailPoet\Models;
|
|||||||
|
|
||||||
if (!defined('ABSPATH')) exit;
|
if (!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class Subscriber extends Model {
|
class Subscriber extends BaseModel {
|
||||||
public static $_table = MP_SUBSCRIBERS_TABLE;
|
public static $_table = MP_SUBSCRIBERS_TABLE;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
Reference in New Issue
Block a user