mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
git-svn-id: https://develop.svn.wordpress.org/trunk@27523 602fd350-edb4-49c9-b593-d223f7449a82
32 lines
708 B
PHP
32 lines
708 B
PHP
<?php
|
|
|
|
class Tests_General_Template extends WP_UnitTestCase {
|
|
|
|
private $i18n_count = 0;
|
|
|
|
function increment_i18n_count() {
|
|
$this->i18n_count += 1;
|
|
}
|
|
|
|
/**
|
|
* @ticket 25735
|
|
*/
|
|
function test_paginate_links_number_format() {
|
|
$this->i18n_count = 0;
|
|
add_filter( 'number_format_i18n', array( $this, 'increment_i18n_count' ) );
|
|
paginate_links( array(
|
|
'total' => 100,
|
|
'current' => 50,
|
|
'show_all' => false,
|
|
'prev_next' => true,
|
|
'end_size' => 1,
|
|
'mid_size' => 1,
|
|
) );
|
|
// The links should be:
|
|
// < Previous 1 ... 49 50 51 ... 100 Next >
|
|
$this->assertEquals( 5, $this->i18n_count );
|
|
remove_filter( 'number_format_i18n', array( $this, 'increment_i18n_count' ) );
|
|
}
|
|
|
|
}
|