PHP code example of kazu9su / functional-tester

1. Go to this page and download the library: Download kazu9su/functional-tester 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/ */

    

kazu9su / functional-tester example snippets


use FunctionalTester/FunctionalTester;

class IndexTest extends PHPUnit_Framework_TestCase
{
    public function testIndex
    {
        $tester = new FunctionalTester();
        
        //set session used in your target product.
        $tester->setSession(['id' => 'hogehoge']);
        
        //set your document root. you can also set as constructer 1st argument.
        $tester->setDocumentRoot('/path/to/src');
        
        //set tBody());
    }
}