- Renamed Model to BaseModel (make it clear)

- Updated RoboFile to compile assets or else tests break
This commit is contained in:
Vlad
2015-08-17 15:54:48 +00:00
parent 61a372dd86
commit a26cbd6f41
22 changed files with 5370 additions and 5368 deletions

View File

@ -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')

View File

@ -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());

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {