summaryrefslogtreecommitdiff
path: root/tests/test-post-order.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-post-order.php')
-rw-r--r--tests/test-post-order.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test-post-order.php b/tests/test-post-order.php
index b5b26c7..7aa0be4 100644
--- a/tests/test-post-order.php
+++ b/tests/test-post-order.php
@@ -5,6 +5,8 @@
* @package DraggablePostOrder
*/
+use Draggable_Post_Order\Draggable_Post_Order;
+
/**
* Sample test case.
*/
@@ -26,13 +28,13 @@ class TestPostOrder extends WP_UnitTestCase {
$this->test_post_type = register_post_type(
'test',
[
- 'supports' => [ 'draggable-post-order' ],
+ 'supports' => [ Draggable_Post_Order::$post_type_feature ],
'has_archive' => true,
]
);
// since tests are loaded after init, run init manually.
- \Draggable_Post_Order\Draggable_Post_Order::init();
+ Draggable_Post_Order::init();
}
/**
@@ -45,12 +47,12 @@ class TestPostOrder extends WP_UnitTestCase {
$meta_sub_query = [
'relation' => 'OR',
'draggable-post-order-clause' => [
- 'key' => 'draggable-post-order',
+ 'key' => Draggable_Post_Order::$meta_key,
'type' => 'NUMERIC',
],
// get all posts without the meta as well.
'draggable-post-order-exists-clause' => [
- 'key' => 'draggable-post-order',
+ 'key' => Draggable_Post_Order::$meta_key,
'compare' => 'NOT EXISTS',
],
];