Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 public static function wpSetUpBeforeClass($factory)
 {
     self::$user_id = $factory->user->create();
     self::$posts = $factory->post->create_many(5, array('post_author' => self::$user_id));
 }