PHP code example of frozzare / wp-test-suite
1. Go to this page and download the library: Download frozzare/wp-test-suite library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
frozzare / wp-test-suite example snippets
WP_Test_Suite::load_plugins( [
__DIR__ . '/../simple-gtm.php'
] );
WP_Test_Suite::run();
xml
<phpunit
bootstrap="vendor/frozzare/wp-test-suite/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<php>
<const name="WTS_PLUGIN_FILE_NAME" value="simple-gtm.php" />
</php>
<testsuites>
<testsuite name="Simple GTM Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-clover" target="./tmp/clover.xml" charset="UTF-8" />
</logging>
</phpunit>