subscriber lists are always from same type

This commit is contained in:
Daniel Seifert 2025-01-05 14:58:30 +01:00
bovenliggende 2991383f18
commit 19338d2a58
Getekend door: DanielS
GPG sleutel-ID: 6A513E13AEE66170
2 gewijzigde bestanden met toevoegingen van 11 en 9 verwijderingen

Bestand weergeven

@ -220,9 +220,9 @@ class Subscriber extends Model
/**
* @throws BaseException
*/
public function tagged(string $tagId): array
public function tagged(string $tagId): SubscriberList
{
return $this->connection->requestAndParse(
$data = $this->connection->requestAndParse(
'POST',
'subscriber/tagged.json',
[
@ -231,6 +231,8 @@ class Subscriber extends Model
],
]
) ?? [];
return new SubscriberList($data);
}
/**

Bestand weergeven

@ -413,14 +413,14 @@ class SubscriberTest extends IntegrationTestCase
$this->expectException(BaseException::class);
}
$this->assertEquals(
$expected,
$this->callMethod(
$sut,
'tagged',
['2354758']
)
$return = $this->callMethod(
$sut,
'tagged',
['2354758']
);
$this->assertInstanceOf(SubscriberList::class, $return);
$this->assertSame($expected, $return->toArray());
}
public static function taggedDataProvider(): Generator