Changeset 42343 for trunk/tests/phpunit/tests/query/parseQuery.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/parseQuery.php
r38288 r42343 10 10 public function test_parse_query_s_array() { 11 11 $q = new WP_Query(); 12 $q->parse_query( array( 13 's' => array( 'foo' ), 14 ) ); 12 $q->parse_query( 13 array( 14 's' => array( 'foo' ), 15 ) 16 ); 15 17 16 18 $this->assertSame( '', $q->query_vars['s'] ); … … 19 21 public function test_parse_query_s_string() { 20 22 $q = new WP_Query(); 21 $q->parse_query( array( 22 's' => 'foo', 23 ) ); 23 $q->parse_query( 24 array( 25 's' => 'foo', 26 ) 27 ); 24 28 25 29 $this->assertSame( 'foo', $q->query_vars['s'] ); … … 28 32 public function test_parse_query_s_float() { 29 33 $q = new WP_Query(); 30 $q->parse_query( array( 31 's' => 3.5, 32 ) ); 34 $q->parse_query( 35 array( 36 's' => 3.5, 37 ) 38 ); 33 39 34 40 $this->assertSame( 3.5, $q->query_vars['s'] ); … … 37 43 public function test_parse_query_s_int() { 38 44 $q = new WP_Query(); 39 $q->parse_query( array( 40 's' => 3, 41 ) ); 45 $q->parse_query( 46 array( 47 's' => 3, 48 ) 49 ); 42 50 43 51 $this->assertSame( 3, $q->query_vars['s'] ); … … 46 54 public function test_parse_query_s_bool() { 47 55 $q = new WP_Query(); 48 $q->parse_query( array( 49 's' => true, 50 ) ); 56 $q->parse_query( 57 array( 58 's' => true, 59 ) 60 ); 51 61 52 62 $this->assertSame( true, $q->query_vars['s'] ); … … 58 68 public function test_parse_query_p_negative_int() { 59 69 $q = new WP_Query(); 60 $q->parse_query( array( 61 'p' => -3, 62 ) ); 70 $q->parse_query( 71 array( 72 'p' => -3, 73 ) 74 ); 63 75 64 76 $this->assertSame( '404', $q->query_vars['error'] ); … … 70 82 public function test_parse_query_p_array() { 71 83 $q = new WP_Query(); 72 $q->parse_query( array( 73 'p' => array(), 74 ) ); 84 $q->parse_query( 85 array( 86 'p' => array(), 87 ) 88 ); 75 89 76 90 $this->assertSame( '404', $q->query_vars['error'] ); … … 82 96 public function test_parse_query_p_object() { 83 97 $q = new WP_Query(); 84 $q->parse_query( array( 85 'p' => new stdClass(), 86 ) ); 98 $q->parse_query( 99 array( 100 'p' => new stdClass(), 101 ) 102 ); 87 103 88 104 $this->assertSame( '404', $q->query_vars['error'] );
Note: See TracChangeset
for help on using the changeset viewer.