Adds unit test
This commit is contained in:
18
tests/unit/API/JSON/v1/AutomatedLatestContentTest.php
Normal file
18
tests/unit/API/JSON/v1/AutomatedLatestContentTest.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Test\API\JSON\v1;
|
||||
|
||||
use MailPoet\API\JSON\v1\AutomatedLatestContent;
|
||||
|
||||
class AutomatedLatestContentTest extends \MailPoetTest {
|
||||
function testItGetsPostTypes() {
|
||||
$router = new AutomatedLatestContent();
|
||||
$response = $router->getPostTypes();
|
||||
expect($response->data)->notEmpty();
|
||||
foreach($response->data as $post_type) {
|
||||
expect($post_type)->count(2);
|
||||
expect($post_type['name'])->notEmpty();
|
||||
expect($post_type['label'])->notEmpty();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user