@@ -4438,6 +4438,9 @@ public function testFilterSubscribers()
44384438 'count_less_than ' => 100 ,
44394439 'after ' => new \DateTime ('2024-01-01 ' ),
44404440 'before ' => new \DateTime ('2027-01-01 ' ),
4441+ 'states ' => [
4442+ 'active ' ,
4443+ ],
44414444 ]
44424445 ]
44434446 );
@@ -4465,6 +4468,9 @@ public function testFilterSubscribersWithMultipleConditions()
44654468 'count_less_than ' => 100 ,
44664469 'after ' => new \DateTime ('2024-01-01 ' ),
44674470 'before ' => new \DateTime ('2027-01-01 ' ),
4471+ 'states ' => [
4472+ 'active ' ,
4473+ ],
44684474 ],
44694475 [
44704476 'type ' => 'clicks ' ,
@@ -4483,7 +4489,7 @@ public function testFilterSubscribersWithMultipleConditions()
44834489
44844490 /**
44854491 * Test that filter_subscribers() returns the expected data
4486- * when multiple any conditions are specified.
4492+ * when no parameters are specified.
44874493 *
44884494 * @since 2.4.0
44894495 *
@@ -4498,6 +4504,29 @@ public function testFilterSubscribersWithNoParameters()
44984504 $ this ->assertPaginationExists ($ result );
44994505 }
45004506
4507+ /**
4508+ * Test that filter_subscribers() throws a ServerException
4509+ * when invalid parameters are specified.
4510+ *
4511+ * @since 2.4.0
4512+ *
4513+ * @return void
4514+ */
4515+ public function testFilterSubscribersWithInvalidParameters ()
4516+ {
4517+ $ this ->expectException (ServerException::class);
4518+ $ result = $ this ->api ->filter_subscribers (
4519+ [
4520+ [
4521+ 'foo ' => 'bar ' ,
4522+ ],
4523+ [
4524+ 'type ' => 'not-a-real-type ' ,
4525+ ]
4526+ ]
4527+ );
4528+ }
4529+
45014530 /**
45024531 * Test that filter_subscribers() returns the expected data
45034532 * when the total count is included.
0 commit comments