PHP code example of villfa / phpunit-extra-constraints

1. Go to this page and download the library: Download villfa/phpunit-extra-constraints 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/ */

    

villfa / phpunit-extra-constraints example snippets



PHPUnitExtraConstraints\Constraint\IsDate;

class ExampleTest extends PHPUnit\Framework\TestCase
{
    public function testDate(): void
    {
        $this->assertThat('2020-04-02', new IsDate('Y-m-d'));
    }
}