-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathupdate_core_phpunit_includes
executable file
·29 lines (25 loc) · 1.49 KB
/
update_core_phpunit_includes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env sh
set -eux
script_dir=$(dirname "$0")
root_dir=$(cd "$script_dir/.." && pwd)
rm -rf "${root_dir}"/includes/core-phpunit/includes &&
rm -rf "${root_dir}"/includes/core-phpunit/wordpress-develop &&
mkdir -p "${root_dir}"/includes/core-phpunit &&
cd "${root_dir}"/includes/core-phpunit &&
git clone -n --depth=1 --filter=tree:0 https://github.com/WordPress/wordpress-develop &&
cd wordpress-develop &&
git sparse-checkout set --no-cone tests/phpunit/includes &&
git checkout &&
cd .. &&
mv wordpress-develop/tests/phpunit/includes ./includes &&
rm -rf wordpress-develop &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/abstract-testcase.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-ajax.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-canonical.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-rest-api.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-rest-controller.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-rest-post-type-controller.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-xml.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/testcase-xmlrpc.php.patch &&
git apply "${root_dir}"/config/patches/core-phpunit/includes/phpunit6/compat.php.patch &&
php "${root_dir}/bin/namespace_global_class_names.php"