Adds unit test

This commit is contained in:
Vlad
2017-09-05 10:33:10 -04:00
parent 6aa0be8d01
commit e4bb3e1133

View 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();
}
}
}