Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -6,13 +6,13 @@ use MailPoet\Models\StatisticsForms;
|
||||
|
||||
class StatisticsFormsTest extends \MailPoetTest {
|
||||
|
||||
function testItCanRecordStats() {
|
||||
public function testItCanRecordStats() {
|
||||
$record = StatisticsForms::record($form_id = 1, $subscriber_id = 2);
|
||||
expect($record->form_id)->equals(1);
|
||||
expect($record->subscriber_id)->equals(2);
|
||||
}
|
||||
|
||||
function testItDoesNotOverrideStats() {
|
||||
public function testItDoesNotOverrideStats() {
|
||||
$record = StatisticsForms::record($form_id = 1, $subscriber_id = 2);
|
||||
expect($record->form_id)->equals(1);
|
||||
expect($record->subscriber_id)->equals(2);
|
||||
@ -20,7 +20,7 @@ class StatisticsFormsTest extends \MailPoetTest {
|
||||
expect(StatisticsForms::count())->equals(1);
|
||||
}
|
||||
|
||||
function testItCanRecordMultipleStats() {
|
||||
public function testItCanRecordMultipleStats() {
|
||||
$record = StatisticsForms::record($form_id = 1, $subscriber_id = 2);
|
||||
$record2 = StatisticsForms::record($form_id = 2, $subscriber_id = 2);
|
||||
$record3 = StatisticsForms::record($form_id = 1, $subscriber_id = 1);
|
||||
@ -28,7 +28,7 @@ class StatisticsFormsTest extends \MailPoetTest {
|
||||
expect(StatisticsForms::count())->equals(3);
|
||||
}
|
||||
|
||||
function testItCannotRecordStatsWithoutFormOrSubscriber() {
|
||||
public function testItCannotRecordStatsWithoutFormOrSubscriber() {
|
||||
$record = StatisticsForms::record($form_id = null, $subscriber_id = 1);
|
||||
expect($record)->false();
|
||||
|
||||
@ -36,7 +36,7 @@ class StatisticsFormsTest extends \MailPoetTest {
|
||||
expect($record)->false();
|
||||
}
|
||||
|
||||
function testItCanReturnTheTotalSignupsOfAForm() {
|
||||
public function testItCanReturnTheTotalSignupsOfAForm() {
|
||||
// simulate 2 signups for form #1
|
||||
StatisticsForms::record($form_id = 1, $subscriber_id = 2);
|
||||
StatisticsForms::record($form_id = 1, $subscriber_id = 1);
|
||||
@ -50,7 +50,7 @@ class StatisticsFormsTest extends \MailPoetTest {
|
||||
expect($form_2_signups)->equals(1);
|
||||
}
|
||||
|
||||
function _after() {
|
||||
public function _after() {
|
||||
StatisticsForms::deleteMany();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user