summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/tests/formatting/SanitizePost.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/tests/formatting/SanitizePost.php')
-rw-r--r--tests/phpunit/tests/formatting/SanitizePost.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/phpunit/tests/formatting/SanitizePost.php b/tests/phpunit/tests/formatting/SanitizePost.php
new file mode 100644
index 0000000000..5dad0beb25
--- /dev/null
+++ b/tests/phpunit/tests/formatting/SanitizePost.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * @group formatting
+ * @group post
+ */
+class Tests_Formatting_SanitizePost extends WP_UnitTestCase {
+
+ /**
+ * @ticket 22324
+ */
+ function test_int_fields() {
+ $post = $this->factory->post->create_and_get();
+ $int_fields = array(
+ 'ID' => 'integer',
+ 'post_parent' => 'integer',
+ 'menu_order' => 'integer',
+ 'post_author' => 'string',
+ 'comment_count' => 'string',
+ );
+
+ foreach ( $int_fields as $field => $type ) {
+ $this->assertInternalType( $type, $post->$field, "field $field" );
+ }
+ }
+}