@@ -49,56 +49,56 @@ public function test_can_install_table() {
4949 'The wp_woocommerce_orders table should not exist at the beginning of this test. '
5050 );
5151
52- WC_Custom_Order_Table_Install ::activate ();
52+ WooCommerce_Custom_Orders_Table_Install ::activate ();
5353
5454 $ this ->assertTrue (
5555 self ::orders_table_exists (),
5656 'Upon activation, the table should be created. '
5757 );
5858 $ this ->assertNotEmpty (
59- get_option ( WC_Custom_Order_Table_Install ::SCHEMA_VERSION_KEY ),
59+ get_option ( WooCommerce_Custom_Orders_Table_Install ::SCHEMA_VERSION_KEY ),
6060 'The schema version should be stored in the options table. '
6161 );
6262 }
6363
6464 public function test_returns_early_if_already_on_latest_schema_version () {
65- WC_Custom_Order_Table_Install ::activate ();
65+ WooCommerce_Custom_Orders_Table_Install ::activate ();
6666
6767 $ this ->assertFalse (
68- WC_Custom_Order_Table_Install ::activate (),
68+ WooCommerce_Custom_Orders_Table_Install ::activate (),
6969 'The activate() method should return false if the schema versions match. '
7070 );
7171 }
7272
7373 public function test_can_upgrade_table () {
74- WC_Custom_Order_Table_Install ::activate ();
74+ WooCommerce_Custom_Orders_Table_Install ::activate ();
7575
7676 // Get the current schema version, then increment it.
77- $ property = new ReflectionProperty ( 'WC_Custom_Order_Table_Install ' , 'table_version ' );
77+ $ property = new ReflectionProperty ( 'WooCommerce_Custom_Orders_Table_Install ' , 'table_version ' );
7878 $ property ->setAccessible ( true );
7979 $ version = $ property ->getValue ();
8080 $ property ->setValue ( $ version + 1 );
8181
8282 // Run the activation script again.
83- WC_Custom_Order_Table_Install ::activate ();
83+ WooCommerce_Custom_Orders_Table_Install ::activate ();
8484
8585 $ this ->assertEquals (
8686 $ version + 1 ,
87- get_option ( WC_Custom_Order_Table_Install ::SCHEMA_VERSION_KEY ),
87+ get_option ( WooCommerce_Custom_Orders_Table_Install ::SCHEMA_VERSION_KEY ),
8888 'The schema version should have been incremented. '
8989 );
9090 }
9191
9292 public function test_current_schema_version_is_not_autoloaded () {
9393 global $ wpdb ;
9494
95- WC_Custom_Order_Table_Install ::activate ();
95+ WooCommerce_Custom_Orders_Table_Install ::activate ();
9696
9797 $ this ->assertEquals (
9898 'no ' ,
9999 $ wpdb ->get_var ( $ wpdb ->prepare (
100100 "SELECT autoload FROM $ wpdb ->options WHERE option_name = %s LIMIT 1 " ,
101- WC_Custom_Order_Table_Install ::SCHEMA_VERSION_KEY
101+ WooCommerce_Custom_Orders_Table_Install ::SCHEMA_VERSION_KEY
102102 ) ),
103103 'The schema version should not be autoloaded. '
104104 );
@@ -112,7 +112,7 @@ public function test_current_schema_version_is_not_autoloaded() {
112112 public function test_database_indexes ( $ non_unique , $ key_name , $ column_name ) {
113113 global $ wpdb ;
114114
115- WC_Custom_Order_Table_Install ::activate ();
115+ WooCommerce_Custom_Orders_Table_Install ::activate ();
116116
117117 $ table = wc_custom_order_table ()->get_table_name ();
118118 $ indexes = $ wpdb ->get_results ( "SHOW INDEX FROM $ table " , ARRAY_A );
0 commit comments