PHP code example of rosio / wordpress-testing-harness
1. Go to this page and download the library: Download rosio/wordpress-testing-harness 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/ */
rosio / wordpress-testing-harness example snippets
namespace Plugin\SomePlugin;
use WP_UnitTestCase;
use \Mockery as m;
class MainPluginTest extends WP_UnitTestCase
{
public function setUp()
{
}
public function tearDown()
{
m::close();
}
public function testPluginIsCreated()
{
$this->assertInstanceOf('Plugin\SomePlugin\MainPlugin', getSomePlugin());
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.