WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/17/2015 06:02:16 PM (5 years ago)
Author:
wonderboymusic
Message:

Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop.

Props nerrad, wonderboymusic.
See #30017, #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/dateQuery.php

    r35225 r35242  
    3434
    3535    public function test_date_query_before_array() {
    36         $p1 = self::$factory->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
    37         $p2 = self::$factory->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
    38         $p3 = self::$factory->post->create( array( 'post_date' => '2008-07-15 07:17:23',) );
    39         $p4 = self::$factory->post->create( array( 'post_date' => '2009-06-11 07:17:23',) );
     36        $p1 = self::factory()->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
     37        $p2 = self::factory()->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
     38        $p3 = self::factory()->post->create( array( 'post_date' => '2008-07-15 07:17:23',) );
     39        $p4 = self::factory()->post->create( array( 'post_date' => '2009-06-11 07:17:23',) );
    4040
    4141        $posts = $this->_get_query_result( array(
     
    5858     */
    5959    public function test_date_query_before_array_test_defaulting() {
    60         $p1 = self::$factory->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
    61         $p2 = self::$factory->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
     60        $p1 = self::factory()->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
     61        $p2 = self::factory()->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
    6262
    6363        $posts = $this->_get_query_result( array(
     
    7575
    7676    public function test_date_query_before_string() {
    77         $p1 = self::$factory->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
    78         $p2 = self::$factory->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
    79         $p3 = self::$factory->post->create( array( 'post_date' => '2008-07-15 07:17:23',) );
    80         $p4 = self::$factory->post->create( array( 'post_date' => '2009-06-11 07:17:23',) );
     77        $p1 = self::factory()->post->create( array( 'post_date' => '2007-09-24 07:17:23',) );
     78        $p2 = self::factory()->post->create( array( 'post_date' => '2008-03-29 07:17:23',) );
     79        $p3 = self::factory()->post->create( array( 'post_date' => '2008-07-15 07:17:23',) );
     80        $p4 = self::factory()->post->create( array( 'post_date' => '2009-06-11 07:17:23',) );
    8181
    8282        $posts = $this->_get_query_result( array(
     
    9292
    9393    public function test_date_query_after_array() {
    94         $p1 = self::$factory->post->create( array( 'post_date' => '2009-10-18 10:42:29', ) );
    95         $p2 = self::$factory->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
    96         $p3 = self::$factory->post->create( array( 'post_date' => '2010-06-11 07:17:23', ) );
     94        $p1 = self::factory()->post->create( array( 'post_date' => '2009-10-18 10:42:29', ) );
     95        $p2 = self::factory()->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
     96        $p3 = self::factory()->post->create( array( 'post_date' => '2010-06-11 07:17:23', ) );
    9797
    9898        $posts = $this->_get_query_result( array(
     
    116116     */
    117117    public function test_date_query_after_array_test_defaulting() {
    118         $p1 = self::$factory->post->create( array( 'post_date' => '2008-12-18 10:42:29', ) );
    119         $p2 = self::$factory->post->create( array( 'post_date' => '2009-01-18 10:42:29', ) );
     118        $p1 = self::factory()->post->create( array( 'post_date' => '2008-12-18 10:42:29', ) );
     119        $p2 = self::factory()->post->create( array( 'post_date' => '2009-01-18 10:42:29', ) );
    120120
    121121        $posts = $this->_get_query_result( array(
     
    133133
    134134    public function test_date_query_after_string() {
    135         $p1 = self::$factory->post->create( array( 'post_date' => '2009-12-18 09:42:29', ) );
    136         $p2 = self::$factory->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
    137         $p3 = self::$factory->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
     135        $p1 = self::factory()->post->create( array( 'post_date' => '2009-12-18 09:42:29', ) );
     136        $p2 = self::factory()->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
     137        $p3 = self::factory()->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
    138138
    139139        $posts = $this->_get_query_result( array(
     
    149149
    150150    public function test_date_query_after_string_inclusive() {
    151         $p1 = self::$factory->post->create( array( 'post_date' => '2009-12-18 09:42:29', ) );
    152         $p2 = self::$factory->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
    153         $p3 = self::$factory->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
     151        $p1 = self::factory()->post->create( array( 'post_date' => '2009-12-18 09:42:29', ) );
     152        $p2 = self::factory()->post->create( array( 'post_date' => '2009-12-18 10:42:29', ) );
     153        $p3 = self::factory()->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
    154154
    155155        $posts = $this->_get_query_result( array(
     
    169169     */
    170170    public function test_date_query_inclusive_between_dates() {
    171         $p1 = self::$factory->post->create( array( 'post_date' => '2006-12-18 09:42:29', ) );
    172         $p2 = self::$factory->post->create( array( 'post_date' => '2007-01-18 10:42:29', ) );
    173         $p3 = self::$factory->post->create( array( 'post_date' => '2007-12-19 10:42:29', ) );
    174         $p4 = self::$factory->post->create( array( 'post_date' => '2008-12-19 10:42:29', ) );
    175         $p5 = self::$factory->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
     171        $p1 = self::factory()->post->create( array( 'post_date' => '2006-12-18 09:42:29', ) );
     172        $p2 = self::factory()->post->create( array( 'post_date' => '2007-01-18 10:42:29', ) );
     173        $p3 = self::factory()->post->create( array( 'post_date' => '2007-12-19 10:42:29', ) );
     174        $p4 = self::factory()->post->create( array( 'post_date' => '2008-12-19 10:42:29', ) );
     175        $p5 = self::factory()->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
    176176
    177177        $posts = $this->_get_query_result( array(
     
    196196     */
    197197    public function test_beforeafter_with_date_string_Y() {
    198         $p1 = self::$factory->post->create( array(
     198        $p1 = self::factory()->post->create( array(
    199199            'post_date' => '2008-05-06 13:00:00',
    200200        ) );
    201         $p2 = self::$factory->post->create( array(
     201        $p2 = self::factory()->post->create( array(
    202202            'post_date' => '2007-05-07 13:00:00',
    203203        ) );
     
    229229     */
    230230    public function test_beforeafter_with_date_string_Y_inclusive() {
    231         $p1 = self::$factory->post->create( array(
     231        $p1 = self::factory()->post->create( array(
    232232            'post_date' => '2008-05-06 13:00:00',
    233233        ) );
    234         $p2 = self::$factory->post->create( array(
     234        $p2 = self::factory()->post->create( array(
    235235            'post_date' => '2007-05-07 13:00:00',
    236236        ) );
     
    264264     */
    265265    public function test_beforeafter_with_date_string_Ym() {
    266         $p1 = self::$factory->post->create( array(
     266        $p1 = self::factory()->post->create( array(
    267267            'post_date' => '2008-05-06 13:00:00',
    268268        ) );
    269         $p2 = self::$factory->post->create( array(
     269        $p2 = self::factory()->post->create( array(
    270270            'post_date' => '2008-04-07 13:00:00',
    271271        ) );
     
    297297     */
    298298    public function test_beforeafter_with_date_string_Ym_inclusive() {
    299         $p1 = self::$factory->post->create( array(
     299        $p1 = self::factory()->post->create( array(
    300300            'post_date' => '2008-05-06 13:00:00',
    301301        ) );
    302         $p2 = self::$factory->post->create( array(
     302        $p2 = self::factory()->post->create( array(
    303303            'post_date' => '2008-04-07 13:00:00',
    304304        ) );
     
    332332     */
    333333    public function test_beforeafter_with_date_string_Ymd() {
    334         $p1 = self::$factory->post->create( array(
     334        $p1 = self::factory()->post->create( array(
    335335            'post_date' => '2008-05-06 13:00:00',
    336336        ) );
    337         $p2 = self::$factory->post->create( array(
     337        $p2 = self::factory()->post->create( array(
    338338            'post_date' => '2008-05-05 13:00:00',
    339339        ) );
     
    365365     */
    366366    public function test_beforeafter_with_date_string_Ymd_inclusive() {
    367         $p1 = self::$factory->post->create( array(
     367        $p1 = self::factory()->post->create( array(
    368368            'post_date' => '2008-05-06 13:00:00',
    369369        ) );
    370         $p2 = self::$factory->post->create( array(
     370        $p2 = self::factory()->post->create( array(
    371371            'post_date' => '2008-05-05 13:00:00',
    372372        ) );
     
    400400     */
    401401    public function test_beforeafter_with_date_string_YmdHi() {
    402         $p1 = self::$factory->post->create( array(
     402        $p1 = self::factory()->post->create( array(
    403403            'post_date' => '2008-05-06 14:05:00',
    404404        ) );
    405         $p2 = self::$factory->post->create( array(
     405        $p2 = self::factory()->post->create( array(
    406406            'post_date' => '2008-05-06 14:04:00',
    407407        ) );
     
    433433     */
    434434    public function test_beforeafter_with_date_string_YmdHi_inclusive() {
    435         $p1 = self::$factory->post->create( array(
     435        $p1 = self::factory()->post->create( array(
    436436            'post_date' => '2008-05-06 14:05:00',
    437437        ) );
    438         $p2 = self::$factory->post->create( array(
     438        $p2 = self::factory()->post->create( array(
    439439            'post_date' => '2008-05-06 14:04:00',
    440440        ) );
     
    468468     */
    469469    public function test_beforeafter_with_date_string_YmdHis() {
    470         $p1 = self::$factory->post->create( array(
     470        $p1 = self::factory()->post->create( array(
    471471            'post_date' => '2008-05-06 14:05:15',
    472472        ) );
    473         $p2 = self::$factory->post->create( array(
     473        $p2 = self::factory()->post->create( array(
    474474            'post_date' => '2008-05-06 14:05:14',
    475475        ) );
     
    501501     */
    502502    public function test_beforeafter_with_date_string_YmdHis_inclusive() {
    503         $p1 = self::$factory->post->create( array(
     503        $p1 = self::factory()->post->create( array(
    504504            'post_date' => '2008-05-06 14:04:15',
    505505        ) );
    506         $p2 = self::$factory->post->create( array(
     506        $p2 = self::factory()->post->create( array(
    507507            'post_date' => '2008-05-06 14:04:14',
    508508        ) );
     
    536536     */
    537537    public function test_beforeafter_with_date_string_non_parseable() {
    538         $p1 = self::$factory->post->create( array(
     538        $p1 = self::factory()->post->create( array(
    539539            'post_date' => '2008-05-06 14:05:15',
    540540        ) );
    541         $p2 = self::$factory->post->create( array(
     541        $p2 = self::factory()->post->create( array(
    542542            'post_date' => '2008-05-06 14:05:14',
    543543        ) );
     
    565565
    566566    public function test_date_query_year() {
    567         $p1 = self::$factory->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
    568         $p2 = self::$factory->post->create( array( 'post_date' => '2010-12-19 10:42:29', ) );
     567        $p1 = self::factory()->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
     568        $p2 = self::factory()->post->create( array( 'post_date' => '2010-12-19 10:42:29', ) );
    569569        $posts = $this->_get_query_result( array(
    570570            'date_query' => array(
     
    579579
    580580    public function test_date_query_month() {
    581         $p1 = self::$factory->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
    582         $p2 = self::$factory->post->create( array( 'post_date' => '2010-11-19 10:42:29', ) );
     581        $p1 = self::factory()->post->create( array( 'post_date' => '2009-12-19 10:42:29', ) );
     582        $p2 = self::factory()->post->create( array( 'post_date' => '2010-11-19 10:42:29', ) );
    583583        $posts = $this->_get_query_result( array(
    584584            'date_query' => array(
     
    593593
    594594    public function test_date_query_week() {
    595         $p1 = self::$factory->post->create( array( 'post_date' => '2009-01-02 10:42:29', ) );
    596         $p2 = self::$factory->post->create( array( 'post_date' => '2010-03-19 10:42:29', ) );
     595        $p1 = self::factory()->post->create( array( 'post_date' => '2009-01-02 10:42:29', ) );
     596        $p2 = self::factory()->post->create( array( 'post_date' => '2010-03-19 10:42:29', ) );
    597597        $posts = $this->_get_query_result( array(
    598598            'date_query' => array(
     
    607607
    608608    public function test_date_query_day() {
    609         $p1 = self::$factory->post->create( array( 'post_date' => '2009-01-17 10:42:29', ) );
    610         $p2 = self::$factory->post->create( array( 'post_date' => '2009-01-18 10:42:29', ) );
     609        $p1 = self::factory()->post->create( array( 'post_date' => '2009-01-17 10:42:29', ) );
     610        $p2 = self::factory()->post->create( array( 'post_date' => '2009-01-18 10:42:29', ) );
    611611
    612612        $posts = $this->_get_query_result( array(
     
    622622
    623623    public function test_date_query_dayofweek() {
    624         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
    625         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-20 10:42:29', ) );
     624        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
     625        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-20 10:42:29', ) );
    626626
    627627        $posts = $this->_get_query_result( array(
     
    640640     */
    641641    public function test_date_query_dayofweek_iso() {
    642         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-31 10:42:29', ) );
    643         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-30 10:42:29', ) );
     642        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-31 10:42:29', ) );
     643        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-30 10:42:29', ) );
    644644
    645645        $posts = $this->_get_query_result( array(
     
    655655
    656656    public function test_date_query_hour() {
    657         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-21 13:42:29', ) );
    658         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-21 12:42:29', ) );
     657        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-21 13:42:29', ) );
     658        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-21 12:42:29', ) );
    659659
    660660        $posts = $this->_get_query_result( array(
     
    674674    public function test_date_query_hour_should_not_ignore_0() {
    675675        return;
    676         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-21 00:42:29', ) );
    677         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-21 01:42:29', ) );
     676        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-21 00:42:29', ) );
     677        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-21 01:42:29', ) );
    678678
    679679        $posts = $this->_get_query_result( array(
     
    689689
    690690    public function test_date_query_minute() {
    691         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-21 10:56:29', ) );
    692         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
     691        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-21 10:56:29', ) );
     692        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
    693693
    694694        $posts = $this->_get_query_result( array(
     
    704704
    705705    public function test_date_query_second() {
    706         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-21 10:42:21', ) );
    707         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
     706        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-21 10:42:21', ) );
     707        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-21 10:42:29', ) );
    708708
    709709        $posts = $this->_get_query_result( array(
     
    719719
    720720    public function test_date_query_between_two_times() {
    721         $p1 = self::$factory->post->create( array( 'post_date' => '2005-12-18 08:42:29', ) );
    722         $p2 = self::$factory->post->create( array( 'post_date' => '2006-12-18 09:00:29', ) );
    723         $p3 = self::$factory->post->create( array( 'post_date' => '2007-12-18 10:42:29', ) );
    724         $p4 = self::$factory->post->create( array( 'post_date' => '2008-12-18 17:00:29', ) );
    725         $p5 = self::$factory->post->create( array( 'post_date' => '2009-12-18 18:42:29', ) );
     721        $p1 = self::factory()->post->create( array( 'post_date' => '2005-12-18 08:42:29', ) );
     722        $p2 = self::factory()->post->create( array( 'post_date' => '2006-12-18 09:00:29', ) );
     723        $p3 = self::factory()->post->create( array( 'post_date' => '2007-12-18 10:42:29', ) );
     724        $p4 = self::factory()->post->create( array( 'post_date' => '2008-12-18 17:00:29', ) );
     725        $p5 = self::factory()->post->create( array( 'post_date' => '2009-12-18 18:42:29', ) );
    726726
    727727        $posts = $this->_get_query_result( array(
     
    744744
    745745    public function test_date_query_relation_or() {
    746         $p1 = self::$factory->post->create( array( 'post_date' => '2006-12-18 14:42:29', ) );
    747         $p2 = self::$factory->post->create( array( 'post_date' => '2007-01-18 10:42:29', ) );
    748         $p3 = self::$factory->post->create( array( 'post_date' => '2007-12-19 10:34:29', ) );
     746        $p1 = self::factory()->post->create( array( 'post_date' => '2006-12-18 14:42:29', ) );
     747        $p2 = self::factory()->post->create( array( 'post_date' => '2007-01-18 10:42:29', ) );
     748        $p3 = self::factory()->post->create( array( 'post_date' => '2007-12-19 10:34:29', ) );
    749749
    750750        $posts = $this->_get_query_result( array(
     
    764764
    765765    public function test_date_query_compare_greater_than_or_equal_to() {
    766         $p1 = self::$factory->post->create( array( 'post_date' => '2006-12-18 13:42:29', ) );
    767         $p2 = self::$factory->post->create( array( 'post_date' => '2007-01-18 14:34:29', ) );
    768         $p3 = self::$factory->post->create( array( 'post_date' => '2007-12-19 14:37:29', ) );
    769         $p4 = self::$factory->post->create( array( 'post_date' => '2007-12-19 15:34:29', ) );
     766        $p1 = self::factory()->post->create( array( 'post_date' => '2006-12-18 13:42:29', ) );
     767        $p2 = self::factory()->post->create( array( 'post_date' => '2007-01-18 14:34:29', ) );
     768        $p3 = self::factory()->post->create( array( 'post_date' => '2007-12-19 14:37:29', ) );
     769        $p4 = self::factory()->post->create( array( 'post_date' => '2007-12-19 15:34:29', ) );
    770770
    771771        $posts = $this->_get_query_result( array(
     
    785785        global $wpdb;
    786786
    787         $p1 = self::$factory->post->create( array( 'post_date' => '2006-05-18 13:42:29', ) );
    788         $p2 = self::$factory->post->create( array( 'post_date' => '2007-09-18 14:34:29', ) );
    789         $p3 = self::$factory->post->create( array( 'post_date' => '2007-01-18 14:34:29', ) );
     787        $p1 = self::factory()->post->create( array( 'post_date' => '2006-05-18 13:42:29', ) );
     788        $p2 = self::factory()->post->create( array( 'post_date' => '2007-09-18 14:34:29', ) );
     789        $p3 = self::factory()->post->create( array( 'post_date' => '2007-01-18 14:34:29', ) );
    790790
    791791        $posts = $this->_get_query_result( array(
     
    805805        global $wpdb;
    806806
    807         $p1 = self::$factory->post->create( array( 'post_date' => '2014-10-01 13:42:29', ) );
    808         $p2 = self::$factory->post->create( array( 'post_date' => '2014-10-22 14:34:29', ) );
    809         $p3 = self::$factory->post->create( array( 'post_date' => '2014-10-15 14:34:29', ) );
     807        $p1 = self::factory()->post->create( array( 'post_date' => '2014-10-01 13:42:29', ) );
     808        $p2 = self::factory()->post->create( array( 'post_date' => '2014-10-22 14:34:29', ) );
     809        $p3 = self::factory()->post->create( array( 'post_date' => '2014-10-15 14:34:29', ) );
    810810
    811811        $posts = $this->_get_query_result( array(
     
    826826     */
    827827    public function test_date_query_with_taxonomy_join() {
    828         $p1 = self::$factory->post->create( array(
     828        $p1 = self::factory()->post->create( array(
    829829            'post_date' => '2013-04-27 01:01:01',
    830830        ) );
    831         $p2 = self::$factory->post->create( array(
     831        $p2 = self::factory()->post->create( array(
    832832            'post_date' => '2013-03-21 01:01:01',
    833833        ) );
     
    858858     */
    859859    public function test_date_query_one_nested_query() {
    860         $p1 = self::$factory->post->create( array( 'post_date' => '2004-10-01 13:42:29', ) );
    861         $p2 = self::$factory->post->create( array( 'post_date' => '2004-01-22 14:34:29', ) );
    862         $p3 = self::$factory->post->create( array( 'post_date' => '1984-10-15 14:34:29', ) );
    863         $p4 = self::$factory->post->create( array( 'post_date' => '1985-10-15 14:34:29', ) );
     860        $p1 = self::factory()->post->create( array( 'post_date' => '2004-10-01 13:42:29', ) );
     861        $p2 = self::factory()->post->create( array( 'post_date' => '2004-01-22 14:34:29', ) );
     862        $p3 = self::factory()->post->create( array( 'post_date' => '1984-10-15 14:34:29', ) );
     863        $p4 = self::factory()->post->create( array( 'post_date' => '1985-10-15 14:34:29', ) );
    864864        $posts = $this->_get_query_result( array(
    865865            'date_query' => array(
     
    887887     */
    888888    public function test_date_query_one_nested_query_multiple_columns_relation_and() {
    889         $p1 = self::$factory->post->create( array(
     889        $p1 = self::factory()->post->create( array(
    890890            'post_date' => '2012-03-05 15:30:55',
    891891        ) );
    892892        $this->update_post_modified( $p1, '2014-11-03 14:43:00' );
    893893
    894         $p2 = self::$factory->post->create( array(
     894        $p2 = self::factory()->post->create( array(
    895895            'post_date' => '2012-05-05 15:30:55',
    896896        ) );
    897897        $this->update_post_modified( $p2, '2014-10-03 14:43:00' );
    898898
    899         $p3 = self::$factory->post->create( array(
     899        $p3 = self::factory()->post->create( array(
    900900            'post_date' => '2013-05-05 15:30:55',
    901901        ) );
    902902        $this->update_post_modified( $p3, '2014-10-03 14:43:00' );
    903903
    904         $p4 = self::$factory->post->create( array(
     904        $p4 = self::factory()->post->create( array(
    905905            'post_date' => '2012-02-05 15:30:55',
    906906        ) );
     
    938938     */
    939939    public function test_date_query_nested_query_multiple_columns_mixed_relations() {
    940         $p1 = self::$factory->post->create( array(
     940        $p1 = self::factory()->post->create( array(
    941941            'post_date' => '2012-03-05 15:30:55',
    942942        ) );
    943943        $this->update_post_modified( $p1, '2014-11-03 14:43:00' );
    944944
    945         $p2 = self::$factory->post->create( array(
     945        $p2 = self::factory()->post->create( array(
    946946            'post_date' => '2012-05-05 15:30:55',
    947947        ) );
    948948        $this->update_post_modified( $p2, '2014-10-03 14:43:00' );
    949949
    950         $p3 = self::$factory->post->create( array(
     950        $p3 = self::factory()->post->create( array(
    951951            'post_date' => '2013-05-05 15:30:55',
    952952        ) );
    953953        $this->update_post_modified( $p3, '2014-10-03 14:43:00' );
    954954
    955         $p4 = self::$factory->post->create( array(
     955        $p4 = self::factory()->post->create( array(
    956956            'post_date' => '2012-02-05 15:30:55',
    957957        ) );
    958958        $this->update_post_modified( $p4, '2012-12-03 14:43:00' );
    959959
    960         $p5 = self::$factory->post->create( array(
     960        $p5 = self::factory()->post->create( array(
    961961            'post_date' => '2014-02-05 15:30:55',
    962962        ) );
Note: See TracChangeset for help on using the changeset viewer.