Extracts some logic into resuable methods

This commit is contained in:
Vlad
2017-05-14 12:07:07 -04:00
parent bd39c34f03
commit 3a1bf88c22
4 changed files with 62 additions and 20 deletions

View File

@@ -903,6 +903,16 @@ class SubscriberTest extends MailPoetTest {
);
}
function testItSetsDefaultValuesForRequiredFields() {
// MySQL running in strict mode requires a value to be set for certain fields
expect(Subscriber::setRequiredFieldsDefaultValues(array()))->equals(
array(
'first_name' => '',
'last_name' => ''
)
);
}
function _after() {
ORM::raw_execute('TRUNCATE ' . Subscriber::$_table);
ORM::raw_execute('TRUNCATE ' . Segment::$_table);