You appear to be a bot. Output may be restricted
Description
Create fake data before our tests run.
Usage
REST_Block_Type_Controller_Test::wpSetUpBeforeClass( $factory );
Parameters
- $factory
- ( WP_UnitTest_Factory ) required – Helper that lets us create fake data.
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/rest-api/rest-block-type-controller.php
Lines:
1 to 20 of 20
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$admin_id = $factory->user->create( array( 'role' => 'administrator', ) ); self::$subscriber_id = $factory->user->create( array( 'role' => 'subscriber', ) ); $name = 'fake/test'; $settings = array( 'icon' => 'text', ); register_block_type( $name, $settings ); }