Fix flaky segments test

This is hard to debug, but the id was NULL in the previous implementation
and that sometimes returned an object instead of expected
Now the id is always a number and that will hopefully fix the flakyness.

[MAILPOET-1578]
This commit is contained in:
Pavel Dohnal
2018-11-01 09:58:44 +01:00
parent 3e22223d0c
commit 35f59cdcc0

View File

@ -124,7 +124,7 @@ class SegmentsTest extends \MailPoetTest {
}
function testItCanBulkDeleteSegments() {
$subscriber_segment = SubscriberSegment::create(array(
$subscriber_segment = SubscriberSegment::createOrUpdate(array(
'subscriber_id' => 1,
'segment_id' => $this->segment_1->id,
'status' => Subscriber::STATUS_SUBSCRIBED