Make WordPress Core

Ticket #28631: 28631-tests.diff

File 28631-tests.diff, 500 bytes (added by jesin, 10 years ago)

Unit tests for 'number' => -1

  • tests/phpunit/tests/user/query.php

     
    136136
    137137                $query->prepare_query();
    138138                $this->assertEquals( $_query_vars, $query->query_vars );
     139
     140                $query->prepare_query( array( 'number' => -1 ) );
     141                $this->assertNotEquals( 'LIMIT -1', $query->query_limit );
     142                $this->assertEmpty( $query->query_limit );
    139143        }
    140144}