tests/unit/Loaders/Filters/OkFileFilterTest.php
/**
     * Test the filter's __invoke() method with multiple files that are not part of a bunch.
     *
     * @return void
     */
Test the filter's __invoke() method with multiple files that are not part of a bunch.
@return void
Test the filter ' s __invoke () method with multiple files that are not part of a bunch . @return void
public function testInvokeOnMultipleFiles()
    {
        $csvFiles = array(
            __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200326-145451_01.csv',
            __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200327-145451_01.csv'
        );
        $filteredCsvFilenames = array(
            __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200326-145451_01.csv'
        );
        $this->assertSame($filteredCsvFilenames, array_filter($csvFiles, $this->okFileFilter));
    }
public function testInvokeOnMultipleFiles ( ) { $ csvFiles = array ( __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200326-145451_01.csv' , __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200327-145451_01.csv' ) ; $ filteredCsvFilenames = array ( __DIR__ . DIRECTORY_SEPARATOR . 'magento-import_20200326-145451_01.csv' ) ; $ this -> assertSame ( $ filteredCsvFilenames , array_filter ( $ csvFiles , $ this -> okFileFilter ) ) ; }
Test the filter's __invoke() method with multiple files that are not part of a bunch.
Test the filter ' s __invoke () method with multiple files that are not part of a bunch .
// initialize the array with the mock CSV files // initialize the array with the filtered CSV files // assert that the CSV file has been filtered