PHP code example of spawnia / phpunit-assert-directory

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

    

spawnia / phpunit-assert-directory example snippets


/**
 * Assert that two directories contain the same files with the same contents.
 *
 * @param  string  $expected Path to the expected directory
 * @param  string  $actual Path to the actual directory
 * @param  string  $message Optional error message in case of failure
 *
 * @throws ExpectationFailedException
 */
public static function assertDirectoryEquals(string $expected, string $actual, string $message = ''): void

/**
 * Assert a directory contains at least the same files as another directory.
 *
 * @param  string  $expected Path to the expected directory
 * @param  string  $actual Path to the actual directory
 * @param  string  $message Optional error message in case of failure
 * @return void
 *
 * @throws ExpectationFailedException
 */
public static function assertDirectoryContains(string $expected, string $actual, string $message = ''): void