diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 5aa78b4..ccb80d4 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -15,11 +15,11 @@ WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib} WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/} download() { - if [ `which curl` ]; then - curl -s "$1" > "$2"; - elif [ `which wget` ]; then - wget -nv -O "$2" "$1" - fi + if [ `which curl` ]; then + curl -s "$1" > "$2"; + elif [ `which wget` ]; then + wget -nv -O "$2" "$1" + fi } if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then @@ -79,6 +79,7 @@ install_test_suite() { # set up testing suite mkdir -p $WP_TESTS_DIR svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes + svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data fi if [ ! -f wp-tests-config.php ]; then diff --git a/locomotive.php b/locomotive.php index 98ec70d..d2fae07 100644 --- a/locomotive.php +++ b/locomotive.php @@ -38,9 +38,9 @@ public function define_constants() { * Admin Dashboard. */ public function add_dashboard() { - add_menu_page( - 'Locomotive', - 'Locomotive', + add_management_page( + __( 'Batch Processes' ), + __( 'Batches' ), 'manage_options', 'locomotive', array( $this, 'dashboard_display' ) @@ -88,7 +88,7 @@ public function attach_hooks() { public function scripts( $hook ) { // Exclude our scripts and CSS files from loading globally. - if ( 'toplevel_page_locomotive' !== $hook ) { + if ( 'tools_page_locomotive' !== $hook ) { return; } diff --git a/tests/test-functions.php b/tests/test-functions.php index 9a1a638..bdbd265 100644 --- a/tests/test-functions.php +++ b/tests/test-functions.php @@ -99,7 +99,7 @@ public function test_asset_loading() { $this->assertFalse( $this->are_batch_assets_enqueued() ); // Call our loader class on the locomotive settings page. - $this->load_admin_enqueue_hook( 'toplevel_page_locomotive' ); + $this->load_admin_enqueue_hook( 'tools_page_locomotive' ); // Check that the items are enquened. $this->assertTrue( $this->are_batch_assets_enqueued() );