@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Blog extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | global $current_site, $base; |
7 | 10 | parent::__construct( $factory ); |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Network extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_Post extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -5,6 +5,10 @@ discard block |
||
5 | 5 | private $taxonomy; |
6 | 6 | const DEFAULT_TAXONOMY = 'post_tag'; |
7 | 7 | |
8 | + /** |
|
9 | + * @param WP_UnitTest_Factory $factory |
|
10 | + * @param string $taxonomy |
|
11 | + */ |
|
8 | 12 | function __construct( $factory = null, $taxonomy = null ) { |
9 | 13 | parent::__construct( $factory ); |
10 | 14 | $this->taxonomy = $taxonomy ? $taxonomy : self::DEFAULT_TAXONOMY; |
@@ -31,6 +35,9 @@ discard block |
||
31 | 35 | return $term_id_pair['term_id']; |
32 | 36 | } |
33 | 37 | |
38 | + /** |
|
39 | + * @param string $taxonomy |
|
40 | + */ |
|
34 | 41 | function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) { |
35 | 42 | return wp_set_post_terms( $post_id, $terms, $taxonomy, $append ); |
36 | 43 | } |
@@ -49,6 +49,9 @@ |
||
49 | 49 | |
50 | 50 | abstract function get_object_by_id( $object_id ); |
51 | 51 | |
52 | + /** |
|
53 | + * @param integer $count |
|
54 | + */ |
|
52 | 55 | function create_many( $count, $args = array(), $generation_definitions = null ) { |
53 | 56 | $results = array(); |
54 | 57 | for ( $i = 0; $i < $count; $i++ ) { |
@@ -2,6 +2,9 @@ |
||
2 | 2 | |
3 | 3 | class WP_UnitTest_Factory_For_User extends WP_UnitTest_Factory_For_Thing { |
4 | 4 | |
5 | + /** |
|
6 | + * @param WP_UnitTest_Factory $factory |
|
7 | + */ |
|
5 | 8 | function __construct( $factory = null ) { |
6 | 9 | parent::__construct( $factory ); |
7 | 10 | $this->default_generation_definitions = array( |
@@ -5,6 +5,9 @@ |
||
5 | 5 | public $next; |
6 | 6 | public $template_string; |
7 | 7 | |
8 | + /** |
|
9 | + * @param integer $start |
|
10 | + */ |
|
8 | 11 | function __construct( $template_string = '%s', $start = null ) { |
9 | 12 | if ( $start ) { |
10 | 13 | $this->next = $start; |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | return true; |
33 | 33 | } |
34 | 34 | |
35 | +/** |
|
36 | + * @param integer $priority |
|
37 | + */ |
|
35 | 38 | function _test_filter_build_unique_id($tag, $function, $priority) { |
36 | 39 | if ( is_string($function) ) |
37 | 40 | return $function; |
@@ -115,6 +118,9 @@ discard block |
||
115 | 118 | return '_wp_die_handler'; |
116 | 119 | } |
117 | 120 | |
121 | +/** |
|
122 | + * @param string $title |
|
123 | + */ |
|
118 | 124 | function _wp_die_handler_txt( $message, $title, $args ) { |
119 | 125 | echo "\nwp_die called\n"; |
120 | 126 | echo "Message : $message\n"; |