fix errors
This commit is contained in:
@@ -107,25 +107,25 @@ class AnalyticsTest extends \MailPoetTest {
|
|||||||
$fakePublicId = 'alk-ded-egrg-zaz-fvf-rtr-zdef';
|
$fakePublicId = 'alk-ded-egrg-zaz-fvf-rtr-zdef';
|
||||||
|
|
||||||
$analytics->setPublicId($fakePublicId);
|
$analytics->setPublicId($fakePublicId);
|
||||||
expect(Setting::getValue('public_id'))->equals($fakePublicId);
|
expect($analytics->getValue('public_id'))->equals($fakePublicId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testIsPublicIdNew() {
|
function testIsPublicIdNew() {
|
||||||
$analytics = new Analytics(new Reporter());
|
$analytics = new Analytics(new Reporter());
|
||||||
$fakePublicId = 'alk-ded-egrg-zaz-fvf-rtr-zdef';
|
$fakePublicId = 'alk-ded-egrg-zaz-fvf-rtr-zdef';
|
||||||
|
|
||||||
Setting::setValue('new_public_id', 'false');
|
$analytics->setValue('new_public_id', 'false');
|
||||||
$analytics->setPublicId($fakePublicId);
|
$analytics->setPublicId($fakePublicId);
|
||||||
// When we update public_id it's marked as new
|
// When we update public_id it's marked as new
|
||||||
expect(Setting::getValue('new_public_id'))->equals('true');
|
expect($analytics->getValue('new_public_id'))->equals('true');
|
||||||
expect(Setting::isPublicIdNew())->true();
|
expect($analytics->isPublicIdNew())->true();
|
||||||
expect(Setting::getValue('new_public_id'))->equals('false');
|
expect($analytics->getValue('new_public_id'))->equals('false');
|
||||||
|
|
||||||
$analytics->setPublicId($fakePublicId);
|
$analytics->setPublicId($fakePublicId);
|
||||||
// We tried to update public_id with the same value, so it's not marked as new
|
// We tried to update public_id with the same value, so it's not marked as new
|
||||||
expect(Setting::getValue('new_public_id'))->equals('false');
|
expect($analytics->getValue('new_public_id'))->equals('false');
|
||||||
expect(Setting::isPublicIdNew())->false();
|
expect($analytics->isPublicIdNew())->false();
|
||||||
expect(Setting::getValue('new_public_id'))->equals('false');
|
expect($analytics->getValue('new_public_id'))->equals('false');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user