diff --git a/.github/workflows/wp-tests.yml b/.github/workflows/wp-tests.yml index 0dfbedaa..b3e42d05 100644 --- a/.github/workflows/wp-tests.yml +++ b/.github/workflows/wp-tests.yml @@ -50,6 +50,9 @@ jobs: - name: Build schema.json run: npm install && npm run build:schema + - name: Install Subversion + run: sudo apt-get update && sudo apt-get install --no-install-recommends --yes subversion + - name: Install WordPress test setup run: bash tests/bin/install-wp-tests.sh wordpress_test root password 127.0.0.1:${{ job.services.mysql.ports[3306] }} latest diff --git a/tests/plugin/test-liberate-controller.php b/tests/plugin/test-liberate-controller.php index ec577b7e..138f366f 100644 --- a/tests/plugin/test-liberate-controller.php +++ b/tests/plugin/test-liberate-controller.php @@ -68,7 +68,9 @@ protected function setUp(): void { protected function tearDown(): void { wp_delete_post( $this->inserted_post_id, true ); - wp_delete_post( $this->transformed_post_id, true ); + if ( 0 < $this->transformed_post_id ) { + wp_delete_post( $this->transformed_post_id, true ); + } } public function testGetStoragePostType() {