From 2eff709060c93f0fd171d3bc24d3110fea6a1a16 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 12 Jun 2019 12:19:14 +0100 Subject: [PATCH] Rename endpoints to controllers --- src/RestApi.php | 6 +++--- unit-tests/bin/install.sh | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/RestApi.php b/src/RestApi.php index 90a8376fa68..3ccfaff8e63 100644 --- a/src/RestApi.php +++ b/src/RestApi.php @@ -28,7 +28,7 @@ class RestApi { * * @var array */ - protected $endpoints = []; + protected $controllers = []; /** * Hook into WordPress ready to init the REST API as needed. @@ -45,8 +45,8 @@ class RestApi { $controllers = $namespace_class::get_controllers(); foreach ( $controllers as $controller_name => $controller_class ) { - $this->endpoints[ $namespace ][ $controller_name ] = new $controller_class(); - $this->endpoints[ $namespace ][ $controller_name ]->register_routes(); + $this->controllers[ $namespace ][ $controller_name ] = new $controller_class(); + $this->controllers[ $namespace ][ $controller_name ]->register_routes(); } } } diff --git a/unit-tests/bin/install.sh b/unit-tests/bin/install.sh index 4cdcc6c5b49..0b6747fc8a3 100755 --- a/unit-tests/bin/install.sh +++ b/unit-tests/bin/install.sh @@ -180,16 +180,9 @@ install_deps() { cd "wp-content/plugins/" git clone --depth 1 https://github.com/woocommerce/woocommerce.git - git clone --depth 1 https://github.com/woocommerce/woocommerce-admin.git - - cd "woocommerce-admin" - composer install - npm install - npm run build cd "$WP_CORE_DIR" php wp-cli.phar plugin activate woocommerce - php wp-cli.phar plugin activate woocommerce-admin if [ "$BRANCH" != "" ]; then # Install the correct branch of the plugin, if running from Travis CI.