Archived
Initial commit
This commit is contained in:
commit
86c1e5f82b
40 files changed
+4362
No files matched your search
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_index
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_author_index');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":2,"authors":[{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""}]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_posts by slug
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_author_posts&slug=chip-bennett');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_posts by author_slug
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_author_posts&author_slug=chip-bennett');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_posts by id
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_author_posts&id=3');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_posts by author_id
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_author_posts&author_id=3');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"pages":3,"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_category_index
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_category_index');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":44,"categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":4,"slug":"antiquarianism","title":"antiquarianism","description":"","parent":0,"post_count":1},{"id":5,"slug":"arrangement","title":"arrangement","description":"","parent":0,"post_count":1},{"id":6,"slug":"asmodeus","title":"asmodeus","description":"","parent":0,"post_count":1},{"id":7,"slug":"broder","title":"broder","description":"","parent":0,"post_count":1},{"id":8,"slug":"buying","title":"buying","description":"","parent":0,"post_count":1},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":12,"slug":"championship","title":"championship","description":"","parent":0,"post_count":1},{"id":13,"slug":"chastening","title":"chastening","description":"","parent":0,"post_count":1},{"id":14,"slug":"clerkship","title":"clerkship","description":"","parent":0,"post_count":1},{"id":15,"slug":"disinclination","title":"disinclination","description":"","parent":0,"post_count":1},{"id":16,"slug":"disinfection","title":"disinfection","description":"","parent":0,"post_count":1},{"id":17,"slug":"dispatch","title":"dispatch","description":"","parent":0,"post_count":1},{"id":18,"slug":"echappee","title":"echappee","description":"","parent":0,"post_count":1},{"id":19,"slug":"enphagy","title":"enphagy","description":"","parent":0,"post_count":1},{"id":20,"slug":"equipollent","title":"equipollent","description":"","parent":0,"post_count":1},{"id":21,"slug":"fatuity","title":"fatuity","description":"","parent":0,"post_count":1},{"id":24,"slug":"gaberlunzie","title":"gaberlunzie","description":"","parent":0,"post_count":1},{"id":25,"slug":"illtempered","title":"illtempered","description":"","parent":0,"post_count":1},{"id":26,"slug":"insubordination","title":"insubordination","description":"","parent":0,"post_count":1},{"id":27,"slug":"lender","title":"lender","description":"","parent":0,"post_count":1},{"id":28,"slug":"monosyllable","title":"monosyllable","description":"","parent":0,"post_count":1},{"id":29,"slug":"packthread","title":"packthread","description":"","parent":0,"post_count":1},{"id":30,"slug":"palter","title":"palter","description":"","parent":0,"post_count":1},{"id":31,"slug":"papilionaceous","title":"papilionaceous","description":"","parent":0,"post_count":1},{"id":33,"slug":"personable","title":"personable","description":"","parent":0,"post_count":1},{"id":34,"slug":"propylaeum","title":"propylaeum","description":"","parent":0,"post_count":1},{"id":35,"slug":"pustule","title":"pustule","description":"","parent":0,"post_count":1},{"id":36,"slug":"quartern","title":"quartern","description":"","parent":0,"post_count":1},{"id":37,"slug":"scholarship","title":"scholarship","description":"","parent":0,"post_count":1},{"id":38,"slug":"selfconvicted","title":"selfconvicted","description":"","parent":0,"post_count":1},{"id":39,"slug":"showshoe","title":"showshoe","description":"","parent":0,"post_count":1},{"id":40,"slug":"sloyd","title":"sloyd","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1},{"id":42,"slug":"sublunary","title":"sublunary","description":"","parent":0,"post_count":1},{"id":43,"slug":"tamtam","title":"tamtam","description":"","parent":0,"post_count":1},{"id":44,"slug":"weakhearted","title":"weakhearted","description":"","parent":0,"post_count":1},{"id":45,"slug":"ween","title":"ween","description":"","parent":0,"post_count":1},{"id":46,"slug":"wellhead","title":"wellhead","description":"","parent":0,"post_count":1},{"id":47,"slug":"wellintentioned","title":"wellintentioned","description":"","parent":0,"post_count":1},{"id":48,"slug":"whetstone","title":"whetstone","description":"","parent":0,"post_count":1},{"id":49,"slug":"years","title":"years","description":"","parent":0,"post_count":1}]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_category_posts default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_category_posts&slug=cat-a');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":2,"pages":1,"category":{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_search_posts default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_date_index');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","permalinks":["http:\/\/wordpress.test\/2008\/09\/","http:\/\/wordpress.test\/2008\/06\/","http:\/\/wordpress.test\/2008\/05\/","http:\/\/wordpress.test\/2008\/04\/","http:\/\/wordpress.test\/2008\/03\/"],"tree":{"2008":{"09":"3","06":"10","05":"5","04":"1","03":"3"}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_date_posts by day
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09-05');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":1,"count_total":1,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_date_posts by month
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur euLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_date_posts by year
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_date_posts&date=2008-09');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":3,"count_total":3,"pages":1,"posts":[{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur euLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_page default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_page&slug=about');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","page":{"id":686,"type":"page","slug":"about","url":"http:\/\/wordpress.test\/about\/","status":"publish","title":"About The Tests","title_plain":"About The Tests","content":"<p>This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and checklist together to test your theme.<\/p>\n<h2>WordPress Theme Development Resources<\/h2>\n<ol>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Development\">Theme Development<\/a> for <a href=\"http:\/\/codex.wordpress.org\/Theme_Development#Code_Standards\">code standards<\/a>, examples of best practices, and <a href=\"http:\/\/codex.wordpress.org\/Theme_Development#Resources_and_References\">resources for Theme development<\/a>.<\/li>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Unit_Test\">Theme Unit Test<\/a> for a robust test suite for your Theme and get the latest version of the test data you see here.<\/li>\n<li>See <a href=\"http:\/\/codex.wordpress.org\/Theme_Review\">Theme Review<\/a> for a guide to submitting your Theme to the <a href=\"http:\/\/wordpress.org\/extend\/themes\/\">Themes Directory<\/a>.<\/li>\n<\/ol>\n","excerpt":"This site is using the standard WordPress Theme Unit Test Data for content. The Theme Unit Test is a series of posts and pages that match up with a checklist on the WordPress codex. You can use the data and … <a href=\"http:\/\/wordpress.test\/about\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2010-07-25 19:40:01","modified":"2010-07-25 19:40:01","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"}}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_page children argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_page&slug=level-1&children=1');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","page":{"id":174,"type":"page","slug":"level-1","url":"http:\/\/wordpress.test\/level-1\/","status":"publish","title":"Level 1","title_plain":"Level 1","content":"<p>Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.<\/p>\n","excerpt":"Level 1 of the reverse hierarchy test. This is to make sure the importer correctly assigns parents and children even when the children come first in the export file.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:25:40","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":173,"type":"page","slug":"level-2","url":"http:\/\/wordpress.test\/level-1\/level-2\/","status":"publish","title":"Level 2","title_plain":"Level 2","content":"<p>Level 2 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 2 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:33","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[{"id":172,"type":"page","slug":"level-3","url":"http:\/\/wordpress.test\/level-1\/level-2\/level-3\/","status":"publish","title":"Level 3","title_plain":"Level 3","content":"<p>Level 3 of the reverse hierarchy test.<\/p>\n","excerpt":"Level 3 of the reverse hierarchy test.","date":"2007-12-11 16:25:40","modified":"2007-12-11 16:23:16","categories":[],"tags":[],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed","children":[]}]}]}}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_post default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_post&slug=readability-test');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","post":{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p><span id=\"more-358\"><\/span><\/p>\n<p>Mrs. Darling first heard of Peter when she was tidying up her children’s minds. It is the nightly custom of every good mother after her children are asleep to rummage in their minds and put things straight for next morning, repacking into their proper places the many articles that have wandered during the day.<\/p>\n<p>If you could keep awake (but of course you can’t) you would see your own mother doing this, and you would find it very interesting to watch her. It is quite like tidying up drawers. You would see her on her knees, I expect, lingering humorously over some of your contents, wondering where on earth you had picked this thing up, making discoveries sweet and not so sweet, pressing this to her cheek as if it were as nice as a kitten, and hurriedly stowing that out of sight. When you wake in the morning, the naughtiness and evil passions with which you went to bed have been folded up small and placed at the bottom of your mind and on the top, beautifully aired, are spread out your prettier thoughts, ready for you to put on.<\/p>\n<p>I don’t know whether you have ever seen a map of a person’s mind. Doctors sometimes draw maps of other parts of you, and your own map can become intensely interesting, but catch them trying to draw a map of a child’s mind, which is not only confused, but keeps going round all the time. There are zigzag lines on it, just like your temperature on a card, and these are probably roads in the island, for the Neverland is always more or less an island, with astonishing splashes of colour here and there, and coral reefs and rakish-looking craft in the offing, and savages and lonely lairs, and gnomes who are mostly tailors, and caves through which a river runs, and princes with six elder brothers, and a hut fast going to decay, and one very small old lady with a hooked nose. It would be an easy map if that were all, but there is also first day at school, religion, fathers, the round pond, needle-work, murders, hangings, verbs that take the dative, chocolate pudding day, getting into braces, say ninety-nine, three-pence for pulling out your tooth yourself, and so on, and either these are part of the island or they are another map showing through, and it is all rather confusing, especially as nothing will stand still.<\/p>\n<p>Of course the Neverlands vary a good deal. John’s, for instance, had a lagoon with flamingoes flying over it at which John was shooting, while Michael, who was very small, had a flamingo with lagoons flying over it. John lived in a boat turned upside down on the sands, Michael in a wigwam, Wendy in a house of leaves deftly sewn together. John had no friends, Michael had friends at night, Wendy had a pet wolf forsaken by its parents, but on the whole the Neverlands have a family resemblance, and if they stood still in a row you could say of them that they have each other’s nose, and so forth. On these magic shores children at play are for ever beaching their coracles [simple boat]. We too have been there; we can still hear the sound of the surf, though we shall land no more.<\/p>\n<p>Of all delectable islands the Neverland is the snuggest and most compact, not large and sprawly, you know, with tedious distances between one adventure and another, but nicely crammed. When you play at it by day with the chairs and table-cloth, it is not in the least alarming, but in the two minutes before you go to sleep it becomes very real. That is why there are night-lights.<\/p>\n<p>Occasionally in her travels through her children’s minds Mrs. Darling found things she could not understand, and of these quite the most perplexing was the word Peter. She knew of no Peter, and yet he was here and there in John and Michael’s minds, while Wendy’s began to be scrawled all over with him. The name stood out in bolder letters than any of the other words, and as Mrs. Darling gazed she felt that it had an oddly cocky appearance.<\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old shLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_recent_posts default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_recent_posts');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur Line truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_recent_posts count argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_recent_posts&count=3');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":3,"count_total":22,"pages":8,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_recent_posts page argument
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_recent_posts&page=2');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":579,"type":"post","slug":"post-format-test-status","url":"http:\/\/wordpress.test\/2008\/06\/04\/post-format-test-status\/","status":"publish","title":"Post Format Test: Status","title_plain":"Post Format Test: Status","content":"<p>WordPress, how do I love thee? Let me count the ways (in 140 characters or less).<\/p>\n","excerpt":"WordPress, how do I love thee? Let me count the ways (in 140 characters or less).","date":"2008-06-04 08:21:24","modified":"2008-06-04 08:21:24","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":582,"type":"post","slug":"post-format-test-video","url":"http:\/\/wordpress.test\/2008\/06\/03\/post-format-test-video\/","status":"publish","title":"Post Format Test: Video","title_plain":"Post Format Test: Video","content":"<p><embed src=\"http:\/\/v.wordpress.com\/hrPKeL5t\" type=\"application\/x-shockwave-flash\" width=\"640\" height=\"360\" allowscriptaccess=\"always\" allowfullscreen=\"true\" wmode=\"transparent\"><\/embed><\/p>\n<p>Posted as per the <a href=\"http:\/\/codex.wordpress.org\/Embeds\" target=\"_blank\">instructions in the Codex<\/a>.<\/p>\n","excerpt":"Posted as per the instructions in the Codex.","date":"2008-06-03 08:25:58","modified":"2008-06-03 08:25:58","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":587,"type":"post","slug":"post-format-test-audio","url":"http:\/\/wordpress.test\/2008\/06\/02\/post-format-test-audio\/","status":"publish","title":"Post Format Test: Audio","title_plain":"Post Format Test: Audio","content":"<p><a href='http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3'>Hayseed Rag \u2013 The Dizzy Trio<\/a><\/p>\n","excerpt":"Hayseed Rag \u2013 The Dizzy Trio","date":"2008-06-02 08:36:44","modified":"2008-06-02 08:36:44","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":622,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/hayseedrag-thedizzytrio_vbr3.mp3","slug":"hayseedrag-thedizzytrio_vbr-2","title":"Hayseed Rag \u2013 The Dizzy Trio","description":"Victor # 19421-B The dizzy trio -novelty fox trot \u2013 Harmonica specialty by Borrah Minevitch \u2013 Harmonica,guitar,banjo, with Jew\u2019s harp and piano \u2013 issue date: May 1924. (<a href=\"http:\/\/www.archive.org\/details\/HayseedRag\">public domain<\/a>)","caption":"Hayseed Rag \u2013 The Dizzy Trio","parent":587,"mime_type":"audio\/mpeg"}],"comment_count":0,"comment_status":"closed"},{"id":494,"type":"post","slug":"if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious","url":"http:\/\/wordpress.test\/2008\/05\/06\/if-you-say-it-loud-enough-you%e2%80%99ll-always-sound-precocious-supercalifragilisticexpialidocious\/","status":"publish","title":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","title_plain":"If you say it loud enough, you\u2019ll always sound precocious; Supercalifragilisticexpialidocious!","content":"<p>A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it’s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas. <img src='http:\/\/wordpress.test\/wp-includes\/images\/smilies\/icon_smile.gif' alt=':)' class='wp-smiley' \/> <\/p>\n","excerpt":"A post with an exceptionally long title and single word (supercalifragilisticexpialidocious\u2014it’s the biggest word you ever heard) useful for testing title line heights and potential overflow issues on posts with small title areas.","date":"2008-05-06 12:23:00","modified":"2008-05-06 12:23:00","categories":[],"tags":[],"author":{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":134,"type":"post","slug":"this-post-has-no-body","url":"http:\/\/wordpress.test\/2008\/05\/05\/this-post-has-no-body\/","status":"publish","title":"This post has no body","title_plain":"This post has no body","content":"","excerpt":"","dateLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_search_posts default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_search_posts&search=wordpress');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"count_total":22,"pages":3,"posts":[{"id":188,"type":"post","slug":"layout-test","url":"http:\/\/wordpress.test\/2008\/09\/04\/layout-test\/","status":"publish","title":"Layout Test","title_plain":"Layout Test","content":"<p>This is a sticky post!!! Make sure it sticks!<\/p>\n<p>This should then split into other pages with layout, images, HTML tags, and other things.<\/p>\n","excerpt":"This is a sticky post!!! Make sure it sticks! This should then split into other pages with layout, images, HTML tags, and other things.","date":"2008-09-04 23:02:20","modified":"2008-09-04 23:02:20","categories":[{"id":3,"slug":"aciform","title":"aciform","description":"","parent":0,"post_count":2},{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2},{"id":10,"slug":"cat-b","title":"Cat B","description":"","parent":0,"post_count":1},{"id":11,"slug":"cat-c","title":"Cat C","description":"","parent":0,"post_count":1},{"id":41,"slug":"sub","title":"sub","description":"","parent":3,"post_count":1}],"tags":[{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":358,"type":"post","slug":"readability-test","url":"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/","status":"publish","title":"Readability Test","title_plain":"Readability Test","content":"<p>All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower and ran with it to her mother. I suppose she must have looked rather delightful, for Mrs. Darling put her hand to her heart and cried, “Oh, why can’t you remain like this for ever!” This was all that passed between them on the subject, but henceforth Wendy knew that she must grow up. You always know after you are two. Two is the beginning of the end.<\/p>\n<p> <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/#more-358\" class=\"more-link\">Read more<\/a><\/p>\n","excerpt":"All children, except one, grow up. They soon know that they will grow up, and the way Wendy knew was this. One day when she was two years old she was playing in a garden, and she plucked another flower … <a href=\"http:\/\/wordpress.test\/2008\/09\/05\/readability-test\/\">Continue reading <span class=\"meta-nav\">→<\/span><\/a>","date":"2008-09-05 00:27:25","modified":"2008-09-05 00:27:25","categories":[{"id":9,"slug":"cat-a","title":"Cat A","description":"","parent":0,"post_count":2}],"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[],"comment_count":0,"comment_status":"closed"},{"id":128,"type":"post","slug":"images-test","url":"http:\/\/wordpress.test\/2008\/09\/03\/images-test\/","status":"publish","title":"Images Test","title_plain":"Images Test","content":"<h2>Image Alignment Tests: Un-Captioned Images<\/h2>\n<h3 id=\"center-align-no-caption\">Center-align, no caption<\/h3>\n<p>Center-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"aligncenter size-full wp-image-535\" \/> ALorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur eu tortor id turpis tristique adipiscing. Morbi blandit. Maecenas vel est. Nunc aliquam, orci at accumsan commodo, libero nibh euismod augue, a ullamcorper velit dui et purus. Aenean volutpat, ipsum ac imperdiet fermentum, dui dui suscipit arcu, vitae dictum purus diam ac ligula.<\/p>\n<h3 id=\"left-align-no-caption\">Left-align, no caption<\/h3>\n<p>Left-aligned image with no caption, and text before and after. <img src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2010\/08\/test-image-landscape1.jpg\" alt=\"\" title=\"test-image-landscape\" width=\"300\" height=\"199\" class=\"alignleft size-full wp-image-535\" \/> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio nibh, tincidunt adipiscing, pretium nec, tincidunt id, enim. Fusce scelerisque nunc vitae nisl. Quisque quis urna in velit dictum pellentesque. Vivamus a quam. Curabitur Line truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_tag_index
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_tag_index');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":40,"tags":[{"id":53,"slug":"chattels","title":"chattels","description":"","post_count":2},{"id":54,"slug":"cienaga","title":"cienaga","description":"","post_count":1},{"id":55,"slug":"claycold","title":"claycold","description":"","post_count":1},{"id":56,"slug":"crushing","title":"crushing","description":"","post_count":1},{"id":58,"slug":"dinarchy","title":"dinarchy","description":"","post_count":1},{"id":59,"slug":"doolie","title":"doolie","description":"","post_count":1},{"id":60,"slug":"energumen","title":"energumen","description":"","post_count":1},{"id":61,"slug":"ephialtes","title":"ephialtes","description":"","post_count":1},{"id":62,"slug":"eudiometer","title":"eudiometer","description":"","post_count":1},{"id":63,"slug":"figuriste","title":"figuriste","description":"","post_count":1},{"id":66,"slug":"habergeon","title":"habergeon","description":"","post_count":1},{"id":67,"slug":"hapless","title":"hapless","description":"","post_count":1},{"id":68,"slug":"hartshorn","title":"hartshorn","description":"","post_count":1},{"id":69,"slug":"hostility-impregnability","title":"hostility impregnability","description":"","post_count":1},{"id":70,"slug":"impropriation","title":"impropriation","description":"","post_count":1},{"id":72,"slug":"knave","title":"knave","description":"","post_count":1},{"id":73,"slug":"misinformed","title":"misinformed","description":"","post_count":1},{"id":74,"slug":"moil","title":"moil","description":"","post_count":1},{"id":75,"slug":"mornful","title":"mornful","description":"","post_count":1},{"id":76,"slug":"outlaw","title":"outlaw","description":"","post_count":1},{"id":77,"slug":"pamphjlet","title":"pamphjlet","description":"","post_count":1},{"id":78,"slug":"pneumatics","title":"pneumatics","description":"","post_count":1},{"id":79,"slug":"portly-portreeve","title":"portly portreeve","description":"","post_count":1},{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10},{"id":81,"slug":"precipitancy","title":"precipitancy","description":"","post_count":1},{"id":82,"slug":"privation","title":"privation","description":"","post_count":2},{"id":83,"slug":"programme","title":"programme","description":"","post_count":1},{"id":84,"slug":"psychological","title":"psychological","description":"","post_count":1},{"id":85,"slug":"puncher","title":"puncher","description":"","post_count":1},{"id":86,"slug":"ramose","title":"ramose","description":"","post_count":1},{"id":87,"slug":"renegade","title":"renegade","description":"","post_count":1},{"id":88,"slug":"retrocede","title":"retrocede","description":"","post_count":1},{"id":89,"slug":"stagnation-unhorsed","title":"stagnation unhorsed","description":"","post_count":1},{"id":93,"slug":"tag1","title":"tag1","description":"","post_count":1},{"id":94,"slug":"tag2","title":"tag2","description":"","post_count":1},{"id":95,"slug":"tag3","title":"tag3","description":"","post_count":1},{"id":98,"slug":"thunderheaded","title":"thunderheaded","description":"","post_count":1},{"id":99,"slug":"unculpable","title":"unculpable","description":"","post_count":1},{"id":100,"slug":"withered-brandnew","title":"withered brandnew","description":"","post_count":1},{"id":101,"slug":"xanthopsia","title":"xanthopsia","description":"","post_count":1}]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_tag_posts default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.get_tag_posts&slug=post-formats');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":10,"pages":1,"tag":{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10},"posts":[{"id":555,"type":"post","slug":"post-format-test-gallery","url":"http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/","status":"publish","title":"Post Format Test: Gallery","title_plain":"Post Format Test: Gallery","content":"\n\t\t<div id='gallery-1' class='gallery galleryid-555 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/canola2\/' title='canola2'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg\" class=\"attachment-thumbnail\" alt=\"canola\" title=\"canola2\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20040724_152504_532\/' title='dsc20040724_152504_532'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20040724_152504_5321.jpg\" class=\"attachment-thumbnail\" alt=\"chunk of resinous blackboy husk\" title=\"dsc20040724_152504_532\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tChunk of resinous blackboy husk, Clarkson, Western Australia. This burns like a spinifex log.\n\t\t\t\t<\/dd><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050315_145007_132\/' title='dsc20050315_145007_132'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050315_145007_1321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050315_145007_132\" title=\"dsc20050315_145007_132\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050604_133440_3421\/' title='dsc20050604_133440_3421'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050604_133440_34211.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050604_133440_3421\" title=\"dsc20050604_133440_3421\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050727_091048_222\/' title='dsc20050727_091048_222'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050727_091048_2221.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050727_091048_222\" title=\"dsc20050727_091048_222\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050813_115856_52\/' title='dsc20050813_115856_52'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050813_115856_521.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050813_115856_52\" title=\"dsc20050813_115856_52\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050831_165238_332\/' title='dsc20050831_165238_332'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050831_165238_3321.jpg\" class=\"attachment-thumbnail\" alt=\"dsc20050831_165238_332\" title=\"dsc20050831_165238_332\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon'>\n\t\t\t\t<a href='http:\/\/wordpress.test\/2008\/06\/10\/post-format-test-gallery\/dsc20050901_105100_212\/' title='dsc20050901_105100_212'><img width=\"150\" height=\"112\" src=\"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/dsc20050901_105100_2121.jpg\" class=\"attachment-thumbnail\" alt=\"Seed pods on stem, Woodvale\" title=\"dsc20050901_105100_212\" \/><\/a>\n\t\t\t<\/dt>\n\t\t\t\t<dd class='wp-caption-text gallery-caption'>\n\t\t\t\tSeed pods on stem, Woodvale\n\t\t\t\t<\/dd><\/dl>\n\t\t\t<br style='clear: both;' \/>\n\t\t<\/div>\n\n","excerpt":"","date":"2008-06-10 07:24:14","modified":"2008-06-10 07:24:14","categories":[],"tags":[{"id":80,"slug":"post-formats","title":"Post Formats","description":"","post_count":10}],"author":{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},"comments":[],"attachments":[{"id":611,"url":"http:\/\/wordpress.test\/wp-content\/uploads\/2011\/01\/canola21.jpg","slug":"canola2","title":"canola2","description":"","caption":"","parent":555,"mime_type":"image\/jpeg","images":{"full":{"url":"http:\/\/wordpress.test\/wp-coLine truncated
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.info default
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.info');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","json_api_version":"1.0.7","controllers":["core","posts","respond"]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.info controller detail
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/?json=core.info&controller=core');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","name":"Core","description":"Basic introspection methods","methods":["info","get_recent_posts","get_post","get_page","get_date_posts","get_category_posts","get_tag_posts","get_author_posts","get_search_results","get_date_index","get_category_index","get_tag_index","get_author_index","get_page_index","get_nonce"]}
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
core.get_author_index with user-friendly URLs
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once 'HTTP/Client.php';
|
||||
$http = new HTTP_Client();
|
||||
$http->get('http://wordpress.test/api/core/get_author_index');
|
||||
$response = $http->currentResponse();
|
||||
echo $response['body'];
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
{"status":"ok","count":2,"authors":[{"id":3,"slug":"chip-bennett","name":"Chip Bennett","first_name":"","last_name":"","nickname":"Chip Bennett","url":"","description":""},{"id":4,"slug":"ian-stewart","name":"Ian Stewart","first_name":"","last_name":"","nickname":"Ian Stewart","url":"","description":""}]}
|
||||
Reference in new issue
Block a user