1. Go to this page and download the library: Download sebkay/touchstone 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/ */
sebkay / touchstone example snippets
namespace WPTS\Tests\Unit;
class ExampleUnitTest extends UnitTest
{
public function test_it_works()
{
$this->assertTrue(true);
}
}
namespace WPTS\Tests\Integration;
class ExampleIntegrationTest extends IntegrationTest
{
public function test_post_title_was_added()
{
$post_id = $this->factory()->post->create([
'post_title' => 'Example post title',
]);
$post = \get_post($post_id);
$this->assertSame('Example post title', $post->post_title);
}
}