Skip to content

Commit 2f693bd

Browse files
authored
Removed Tests
1 parent c820d57 commit 2f693bd

16 files changed

+27
-1318
lines changed

.github/workflows/php-code-quality.yml

Lines changed: 0 additions & 181 deletions
This file was deleted.

.github/workflows/wordpress-tests.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow runs automated tests for the Simple WP Optimizer plugin against multiple
22
# WordPress and PHP versions to ensure compatibility across environments.
33
# It sets up a MySQL database, installs WordPress, and runs PHPUnit tests in a matrix configuration.
4-
# Testing multiple PHP versions (7.4 through 8.2) and WordPress versions (5.6 through latest)
4+
# Testing multiple PHP versions (7.4 through 8.4) and WordPress versions (latest)
55
# helps catch compatibility issues before they affect users.
66

77
name: WordPress Plugin Tests
@@ -282,34 +282,33 @@ jobs:
282282
if ! sudo cp -f /tmp/wordpress-tests-lib/includes/functions.php /wordpress-tests-lib/includes/; then echo "::warning::Failed to copy functions.php"; fi
283283
if ! sudo cp -f /tmp/wordpress-tests-lib/wp-tests-config.php /wordpress-tests-lib/; then echo "::warning::Failed to copy wp-tests-config.php"; fi
284284
fi
285-
285+
286286
# Create or copy required class-basic-object.php file if missing
287287
if [ ! -f "/tmp/wordpress-tests-lib/includes/class-basic-object.php" ]; then
288288
echo "Creating missing class-basic-object.php file in /tmp/wordpress-tests-lib..."
289-
cat > /tmp/wordpress-tests-lib/includes/class-basic-object.php << 'EOF'
290-
<?php
291-
/**
292-
* Basic object, which other objects in WordPress extend.
293-
*
294-
* This is a simplified version for tests to fix the missing class issue.
295-
*/
296-
class Basic_Object {
297-
/**
298-
* Retrieve a value from an array with support for a default value.
299-
*
300-
* @param array \$args Arguments.
301-
* @param string \$key Key to retrieve.
302-
* @param mixed \$default Default value.
303-
* @return mixed Value if set, default if not.
304-
*/
305-
protected function get_from_array( \$args, \$key, \$default = null ) {
306-
if ( isset( \$args[ \$key ] ) ) {
307-
return \$args[ \$key ];
308-
}
309-
return \$default;
310-
}
311-
}
312-
EOF
289+
printf '%s\n' \
290+
'<?php' \
291+
'/**' \
292+
' * Basic object, which other objects in WordPress extend.' \
293+
' *' \
294+
' * This is a simplified version for tests to fix the missing class issue.' \
295+
' */' \
296+
'class Basic_Object {' \
297+
' /**' \
298+
' * Retrieve a value from an array with support for a default value.' \
299+
' *' \
300+
' * @param array $args Arguments.' \
301+
' * @param string $key Key to retrieve.' \
302+
' * @param mixed $default Default value.' \
303+
' * @return mixed Value if set, default if not.' \
304+
' */' \
305+
' protected function get_from_array( $args, $key, $default = null ) {' \
306+
' if ( isset( $args[ $key ] ) ) {' \
307+
' return $args[ $key ];' \
308+
' }' \
309+
' return $default;' \
310+
' }' \
311+
'}' > /tmp/wordpress-tests-lib/includes/class-basic-object.php
313312
fi
314313
315314
# Copy to the alternate path as well
@@ -319,7 +318,7 @@ EOF
319318
sudo cp -f /tmp/wordpress-tests-lib/includes/class-basic-object.php /wordpress-tests-lib/includes/ || echo "::warning::Failed to copy class-basic-object.php"
320319
else
321320
echo "Creating missing class-basic-object.php file in /wordpress-tests-lib..."
322-
sudo bash -c 'cat > /wordpress-tests-lib/includes/class-basic-object.php << '\''EOF'\''
321+
sudo bash -c "cat > /wordpress-tests-lib/includes/class-basic-object.php << 'EOF'
323322
<?php
324323
/**
325324
* Basic object, which other objects in WordPress extend.
@@ -342,7 +341,7 @@ class Basic_Object {
342341
return \$default;
343342
}
344343
}
345-
EOF'
344+
EOF"
346345
fi
347346
fi
348347

PHPUNIT-COMPATIBILITY.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

bin/db.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)