wordpress-develop/tests/phpunit/tests/formatting/SanitizePost.php
Andrew Nacin 8045afd81b Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.

see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:39:34 +00:00

26 lines
539 B
PHP

<?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" );
}
}
}