@@ -335,20 +335,20 @@ public function getListMembersWithCurrentSessionKeyForExistingListWithSubscriber
335
335
/**
336
336
* @test
337
337
*/
338
- public function getListCountForExistingListWithoutSessionKeyReturnsForbiddenStatus ()
338
+ public function getListCountsubscribersForExistingListWithoutSessionKeyReturnsForbiddenStatus ()
339
339
{
340
340
$ this ->getDataSet ()->addTable (static ::LISTS_TABLE_NAME , __DIR__ . '/Fixtures/SubscriberList.csv ' );
341
341
$ this ->applyDatabaseChanges ();
342
342
343
- $ this ->client ->request ('get ' , '/api/v2/lists/1/count ' );
343
+ $ this ->client ->request ('get ' , '/api/v2/lists/1/countsubscribers ' );
344
344
345
345
$ this ->assertHttpForbidden ();
346
346
}
347
347
348
348
/**
349
349
* @test
350
350
*/
351
- public function getListCountForExistingListWithExpiredSessionKeyReturnsForbiddenStatus ()
351
+ public function getListCountsubscribersForExistingListWithExpiredSessionKeyReturnsForbiddenStatus ()
352
352
{
353
353
$ this ->getDataSet ()->addTable (static ::LISTS_TABLE_NAME , __DIR__ . '/Fixtures/SubscriberList.csv ' );
354
354
$ this ->getDataSet ()->addTable (static ::ADMINISTRATOR_TABLE_NAME , __DIR__ . '/Fixtures/Administrator.csv ' );
@@ -357,7 +357,7 @@ public function getListCountForExistingListWithExpiredSessionKeyReturnsForbidden
357
357
358
358
$ this ->client ->request (
359
359
'get ' ,
360
- '/api/v2/lists/1/count ' ,
360
+ '/api/v2/lists/1/countsubscribers ' ,
361
361
[],
362
362
[],
363
363
['PHP_AUTH_USER ' => 'unused ' , 'PHP_AUTH_PW ' => 'cfdf64eecbbf336628b0f3071adba763 ' ]
@@ -369,45 +369,45 @@ public function getListCountForExistingListWithExpiredSessionKeyReturnsForbidden
369
369
/**
370
370
* @test
371
371
*/
372
- public function getListCountWithCurrentSessionKeyForExistingListReturnsOkayStatus ()
372
+ public function getListCountsubscribersWithCurrentSessionKeyForExistingListReturnsOkayStatus ()
373
373
{
374
374
$ this ->getDataSet ()->addTable (static ::LISTS_TABLE_NAME , __DIR__ . '/Fixtures/SubscriberList.csv ' );
375
375
$ this ->applyDatabaseChanges ();
376
376
377
- $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/1/count ' );
377
+ $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/1/countsubscribers ' );
378
378
379
379
$ this ->assertHttpOkay ();
380
380
}
381
381
382
382
/**
383
383
* @test
384
384
*/
385
- public function getListCountWithCurrentSessionKeyForExistingListWithSubscribersReturnsSubscribersCount ()
385
+ public function getListCountsubscribersWithCurrentSessionKeyForExistingListWithNoSubscribersReturnsZero ()
386
386
{
387
387
$ this ->getDataSet ()->addTable (static ::LISTS_TABLE_NAME , __DIR__ . '/Fixtures/SubscriberList.csv ' );
388
388
$ this ->getDataSet ()->addTable (static ::SUBSCRIBER_TABLE_NAME , __DIR__ . '/Fixtures/Subscriber.csv ' );
389
389
$ this ->getDataSet ()->addTable (static ::SUBSCRIPTION_TABLE_NAME , __DIR__ . '/Fixtures/Subscription.csv ' );
390
390
$ this ->applyDatabaseChanges ();
391
391
392
- $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/2/count ' );
392
+ $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/3/countsubscribers ' );
393
393
$ response = $ this ->getResponseContentAsInt ();
394
-
395
- static ::assertSame (1 , $ response );
394
+
395
+ static ::assertSame (0 , $ response );
396
396
}
397
397
398
398
/**
399
399
* @test
400
400
*/
401
- public function getListCountWithCurrentSessionKeyForExistingListWithNoSubscribersReturnsZero ()
401
+ public function getListCountsubscribersWithCurrentSessionKeyForExistingListWithSubscribersReturnsSubscribersCount ()
402
402
{
403
403
$ this ->getDataSet ()->addTable (static ::LISTS_TABLE_NAME , __DIR__ . '/Fixtures/SubscriberList.csv ' );
404
404
$ this ->getDataSet ()->addTable (static ::SUBSCRIBER_TABLE_NAME , __DIR__ . '/Fixtures/Subscriber.csv ' );
405
405
$ this ->getDataSet ()->addTable (static ::SUBSCRIPTION_TABLE_NAME , __DIR__ . '/Fixtures/Subscription.csv ' );
406
406
$ this ->applyDatabaseChanges ();
407
407
408
- $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/3/count ' );
408
+ $ this ->authenticatedJsonRequest ('get ' , '/api/v2/lists/2/countsubscribers ' );
409
409
$ response = $ this ->getResponseContentAsInt ();
410
410
411
- static ::assertSame (0 , $ response );
411
+ static ::assertSame (1 , $ response );
412
412
}
413
413
}
0 commit comments