WordPress.org

Make WordPress Core

Ticket #24079: 24079.patch.txt

File 24079.patch.txt, 1.3 KB (added by bobbravo2, 12 months ago)
Line 
1Index: includes/factory.php
2===================================================================
3--- includes/factory.php        (revision 1258)
4+++ includes/factory.php        (working copy)
5@@ -1,6 +1,38 @@
6 <?php
7 
8 class WP_UnitTest_Factory {
9+       /**
10+        * @var WP_UnitTest_Factory_For_Post
11+        */
12+       public $post;
13+       /**
14+        * @var WP_UnitTest_Factory_For_Attachment
15+        */
16+       public $attachment;
17+       /**
18+        * @var WP_UnitTest_Factory_For_Comment
19+        */
20+       public $comment;
21+       /**
22+        * @var WP_UnitTest_Factory_For_User
23+        */
24+       public $user;
25+       /**
26+        * @var WP_UnitTest_Factory_For_Term
27+        */
28+       public $term;
29+       /**
30+        * @var WP_UnitTest_Factory_For_Term
31+        */
32+       public $category;
33+       /**
34+        * @var WP_UnitTest_Factory_For_Term
35+        */
36+       public $tag;
37+       /**
38+        * @var WP_UnitTest_Factory_For_Blog
39+        */
40+       public $blog;
41        function __construct() {
42                $this->post = new WP_UnitTest_Factory_For_Post( $this );
43                $this->attachment = new WP_UnitTest_Factory_For_Attachment( $this );
44Index: includes/testcase.php
45===================================================================
46--- includes/testcase.php       (revision 1258)
47+++ includes/testcase.php       (working copy)
48@@ -6,7 +6,10 @@
49 class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
50 
51        protected static $forced_tickets = array();
52-
53+       /**
54+        * @var WP_UnitTest_Factory
55+        */
56+       protected $factory;
57        function setUp() {
58                set_time_limit(0);
59