PHP code example of bariew / yii2-doctest-extension

1. Go to this page and download the library: Download bariew/yii2-doctest-extension 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/ */

    

bariew / yii2-doctest-extension example snippets


    /**
     * Returns user default name
     * @return string name.
     * @example $this->getDefaultName() == "Mr. Smith"
     */
    protected function getDefaultName()
    {
        return "Mr. Smith"
    }

    $docTester = new \bariew\docTest\UnitTest("app\models\User");
    $docTester->test();

    $docTester = new \bariew\docTest\UrlTest("app\controllers\UserController");
    $docTester->test();