PHP code example of mhujer / consistence-phpunit

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

    

mhujer / consistence-phpunit example snippets


EnumAssert::assertSame($expectedEnum, $actualEnum);

public function testEnumsAreSame(): void
{
    EnumAssert::assertSame(CardColor::get(CardColor::RED), CardColor::get(CardColor::BLACK));

    // Expected "Mhujer\ConsistencePhpunit\Fixtures\CardColor:red", but got "Mhujer\ConsistencePhpunit\Fixtures\CardColor:black
}