25 lines
798 B
PHP
Executable File
25 lines
798 B
PHP
Executable File
<?php
|
|
require_once 'vendor/autoload.php';
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use App\Helpers\ExcelMergeHelper;
|
|
|
|
class ExcelMergeHelperTest extends TestCase
|
|
{
|
|
public function testMergeExcelFiles_Success()
|
|
{
|
|
// Use the paths you provided
|
|
$filePaths = [
|
|
'/home/venba/Downloads/Financial_Sample.xlsx' => [1,3,2],
|
|
'/home/venba/Downloads/enrollment.xlsx' => []
|
|
];
|
|
$outputPath = '/home/venba/Documents/merged_file.xlsx'; // Output path for the merged file
|
|
|
|
// Call the mergeExcelFiles function
|
|
$result = ExcelMergeHelper::mergeExcelFiles($filePaths, $outputPath);
|
|
var_dump($result);
|
|
// Check if the result is true (indicating success)
|
|
$this->assertTrue($result, 'Expected true, but got false');
|
|
}
|
|
|
|
} |