public static function setUpBeforeClass() { $factory = new WP_UnitTest_Factory(); self::$user = $factory->user->create(); self::$posts = $factory->post->create_many(25, array('post_author' => self::$user)); self::commit_transaction(); }
public static function wpSetUpBeforeClass($factory) { self::$user_id = $factory->user->create(); self::$posts = $factory->post->create_many(5, array('post_author' => self::$user_id)); }