Files
FOSSBilling/tests/Unit/DemoSeedCredentialTest.php
Adam Daley 99f6351b83 Require TEST_API_KEY for demo seeder; remove insecure --key CLI option (#4345)
* Fix demo seed credential input

* Fix demo seeder test for CI test image
2026-09-17 20:10:40 +01:00

18 lines
543 B
PHP

<?php
declare(strict_types=1);
use Symfony\Component\Filesystem\Path;
test('the demo seeder does not accept API keys as command-line arguments', function (): void {
$script = file_get_contents(Path::join(dirname(PATH_ROOT), 'tools', 'demo-seed', 'demo-seed.php'));
$readme = file_get_contents(Path::join(dirname(PATH_ROOT), 'tools', 'demo-seed', 'README.md'));
expect($script)
->not->toBeFalse()
->not->toContain('--key')
->and($readme)
->not->toBeFalse()
->not->toContain('--key');
});