2020-06-16 00:22:35 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Mock product query.
|
|
|
|
*
|
2020-08-11 19:18:47 +00:00
|
|
|
* @package WooCommerce\Admin\Tests\RemoteInboxNotifications
|
2020-06-16 00:22:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mock product query.
|
|
|
|
*/
|
|
|
|
class MockProductQuery {
|
|
|
|
/**
|
|
|
|
* Construct the mock product query with the given number of products.
|
|
|
|
*
|
|
|
|
* @param integer $total The number of products.
|
|
|
|
*/
|
|
|
|
public function __construct( $total ) {
|
|
|
|
$this->total = $total;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the mock products
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function get_products() {
|
|
|
|
return (object) array(
|
|
|
|
'total' => $this->total,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|