woocommerce/tests/framework/class-wc-dummy-data-store.php

51 lines
1.3 KiB
PHP
Raw Normal View History

<?php
/**
* Dummy WC data stores used to test data store functionality.
*
* @package WooCommerce\Tests\Framework
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// phpcs:disable Squiz.Commenting
/**
* WC Dummy Data Store: CPT.
*
* Used to test swapping out data stores.
*
2017-03-15 16:36:53 +00:00
* @version 3.0.0
*/
2016-11-22 13:54:51 +00:00
class WC_Dummy_Data_Store_CPT implements WC_Object_Data_Store_Interface {
public function create( &$data ) { }
public function read( &$data ) { }
public function update( &$data ) { }
2016-11-15 18:11:25 +00:00
public function delete( &$data, $args = array() ) { }
public function read_meta( &$data ) { }
public function delete_meta( &$data, $meta ) { }
public function add_meta( &$data, $meta ) { }
public function update_meta( &$data, $meta ) { }
}
/**
* WC Dummy Data Store: Custom Table.
*
* Used to test swapping out data stores.
*
2017-03-15 16:36:53 +00:00
* @version 3.0.0
*/
2016-11-22 13:54:51 +00:00
class WC_Dummy_Data_Store_Custom_Table implements WC_Object_Data_Store_Interface {
public function create( &$data ) { }
public function read( &$data ) { }
public function update( &$data ) { }
2016-11-15 18:11:25 +00:00
public function delete( &$data, $args = array() ) { }
public function read_meta( &$data ) { }
public function delete_meta( &$data, $meta ) { }
public function add_meta( &$data, $meta ) { }
public function update_meta( &$data, $meta ) { }
}
// phpcs:enable