PHP code example of php-platform / restful-unit

1. Go to this page and download the library: Download php-platform/restful-unit 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/ */

    

php-platform / restful-unit example snippets



class MyRestFulTest extends TestCase {
    static function setUpBeforeClass(){
        parent::setUpBeforeClass();
        \PhpPlatform\Tests\RestfulUnit\ServiceTestCase::setUpBeforeClass();
    }
    
    function setUp(){
        parent::setUp();
        \PhpPlatform\Tests\RestfulUnit\ServiceTestCase::setUp();
    }
    
    static function tearDownAfterClass(){
        parent::tearDownAfterClass();
        \PhpPlatform\Tests\RestfulUnit\ServiceTestCase::tearDownAfterClass();
    }
    
    function tearDown(){
        parent::tearDown();
        \PhpPlatform\Tests\RestfulUnit\ServiceTestCase::tearDown();
    }
}


XML
<phpunit colors="true" bootstrap="vendor/php-platform/restful-unit/resources/autoload.php" >
</phpunit>