|
@@ 22-28 (lines=7) @@
|
| 19 |
|
$this->q = new WP_Date_Query(array( 'm' => 2 )); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
public function test_construct_date_query_empty() |
| 23 |
|
{ |
| 24 |
|
$q = new WP_Date_Query(array()); |
| 25 |
|
$this->assertSame('AND', $q->relation); |
| 26 |
|
$this->assertSame('post_date', $q->column); |
| 27 |
|
$this->assertSame('=', $q->compare); |
| 28 |
|
$this->assertSame(array(), $q->queries); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
public function test_construct_date_query_non_array() |
|
@@ 31-37 (lines=7) @@
|
| 28 |
|
$this->assertSame(array(), $q->queries); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
public function test_construct_date_query_non_array() |
| 32 |
|
{ |
| 33 |
|
$q = new WP_Date_Query('foo'); |
| 34 |
|
$this->assertSame('AND', $q->relation); |
| 35 |
|
$this->assertSame('post_date', $q->column); |
| 36 |
|
$this->assertSame('=', $q->compare); |
| 37 |
|
$this->assertSame(array(), $q->queries); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
public function test_construct_relation_or_lowercase() |