You appear to be a bot. Output may be restricted
Description
Usage
WP_REST_Test_Search_Handler::__construct( $amount );
Parameters
- $amount
- ( mixed ) optional default: 10 –
Returns
void
Source
File name: wordpress-develop-tests/phpunit/includes/class-wp-rest-test-search-handler.php
Lines:
1 to 18 of 18
public function __construct( $amount = 10 ) { $this->type = 'test'; $this->subtypes = array( 'test_first_type', 'test_second_type' ); $this->items = array(); for ( $i = 1; $i <= $amount; $i++ ) { $subtype = $i > $amount / 2 ? 'test_second_type' : 'test_first_type'; $this->items[ $i ] = (object) array( 'test_id' => $i, 'test_title' => sprintf( 'Title %d', $i ), 'test_url' => sprintf( home_url( '/tests/%d' ), $i ), 'test_type' => $subtype, ); } }