PHP code example of phpfui / phpunit-syntax-coverage
1. Go to this page and download the library: Download phpfui/phpunit-syntax-coverage 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/ */
phpfui / phpunit-syntax-coverage example snippets
class UnitTest extends \PHPFUI\PHPUnitSyntaxCoverage\Extensions
{
public function testProjectSyntax()
{
$this->addSkipDirectory(__DIR__ . '/../App/Examples');
$this->assertValidPHPDirectory(__DIR__ . '/../App', 'App directory has an error');
$this->assertValidPHPFile(__FILE__, 'Unit Test file not valid');
$this->assertValidPHP(' echo "hi";');
}
}
$this->assertValidPHPDirectory(__DIR__ . '/../App', 'App directory error');