assertNotEmpty( $query->query_vars ); $this->assertEquals( '', $query->get( 'parent' ) ); $this->assertEquals( 'date', $query->get( 'orderby' ) ); } /** * Test setting/getting query vars. * * @since 3.1.0 */ function test_query_with_args() { $args = array( 'per_page' => 15 ); $query = new WC_Mock_WC_Object_Query( $args ); $this->assertEquals( 15, $query->get( 'per_page' ) ); $query->set( 'per_page', 20 ); $this->assertEquals( 20, $query->get( 'per_page' ) ); } }