1
0
mirror of synced 2025-02-23 18:33:13 +03:00
Akolzin Dmitry b5b6419ca4 v3.0.0 (#60)
* Tests
* Travis
* Deployment script
2018-04-27 11:19:02 +03:00

27 lines
1.0 KiB
PHP

<?php
$_tests_dir = getenv('WP_TESTS_DIR');
if (!$_tests_dir) {
$_tests_dir = '/tmp/wordpress-tests-lib';
}
require_once $_tests_dir . '/includes/functions.php';
function _manually_load_plugin() {
$plugin_dir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/';
require $plugin_dir . 'woocommerce-retailcrm/src/include/class-wc-retailcrm-orders.php';
require $plugin_dir . 'woocommerce-retailcrm/src/include/class-wc-retailcrm-customers.php';
require $plugin_dir . 'woocommerce-retailcrm/src/include/class-wc-retailcrm-inventories.php';
require $plugin_dir . 'woocommerce-retailcrm/src/retailcrm.php';
}
tests_add_filter('muplugins_loaded', '_manually_load_plugin');
require '/tmp/woocommerce/tests/bootstrap.php';
$plugin_dir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/';
// helpers
require $plugin_dir . 'woocommerce-retailcrm/tests/helpers/class-wc-retailcrm-response-helper.php';
require $plugin_dir . 'woocommerce-retailcrm/tests/helpers/class-wc-retailcrm-test-case-helper.php';