mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Replace fedora with valid platform name
This commit is contained in:
parent
a31f8b1a2b
commit
9457ce6e2b
@ -12,9 +12,9 @@ describe('Config tests', () => {
|
||||
|
||||
win32 = await config.addINIValues(
|
||||
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
|
||||
'fedora'
|
||||
'openbsd'
|
||||
);
|
||||
expect(win32).toContain('Platform fedora is not supported');
|
||||
expect(win32).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking addINIValuesOnLinux', async () => {
|
||||
@ -29,9 +29,9 @@ describe('Config tests', () => {
|
||||
|
||||
linux = await config.addINIValues(
|
||||
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
|
||||
'fedora'
|
||||
'openbsd'
|
||||
);
|
||||
expect(linux).toContain('Platform fedora is not supported');
|
||||
expect(linux).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking addINIValuesOnDarwin', async () => {
|
||||
@ -45,8 +45,8 @@ describe('Config tests', () => {
|
||||
|
||||
darwin = await config.addINIValues(
|
||||
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
|
||||
'fedora'
|
||||
'openbsd'
|
||||
);
|
||||
expect(darwin).toContain('Platform fedora is not supported');
|
||||
expect(darwin).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
});
|
||||
|
@ -46,8 +46,8 @@ describe('Extension tests', () => {
|
||||
expect(win32).toContain('Add-Phalcon phalcon3');
|
||||
expect(win32).toContain('Add-Extension does_not_exist');
|
||||
|
||||
win32 = await extensions.addExtension('xdebug', '7.2', 'fedora');
|
||||
expect(win32).toContain('Platform fedora is not supported');
|
||||
win32 = await extensions.addExtension('xdebug', '7.2', 'openbsd');
|
||||
expect(win32).toContain('Platform openbsd is not supported');
|
||||
|
||||
win32 = await extensions.addExtension('blackfire', '7.3', 'win32');
|
||||
expect(win32).toContain('Add-Blackfire blackfire');
|
||||
@ -100,8 +100,8 @@ describe('Extension tests', () => {
|
||||
linux = await extensions.addExtension('cubrid', '7.4', 'linux');
|
||||
expect(linux).toContain('add_cubrid cubrid');
|
||||
|
||||
linux = await extensions.addExtension('xdebug', '7.2', 'fedora');
|
||||
expect(linux).toContain('Platform fedora is not supported');
|
||||
linux = await extensions.addExtension('xdebug', '7.2', 'openbsd');
|
||||
expect(linux).toContain('Platform openbsd is not supported');
|
||||
|
||||
linux = await extensions.addExtension('phalcon3, phalcon4', '7.3', 'linux');
|
||||
expect(linux).toContain('add_phalcon phalcon3');
|
||||
@ -195,7 +195,7 @@ describe('Extension tests', () => {
|
||||
);
|
||||
expect(darwin).toContain('add_extension does_not_exist');
|
||||
|
||||
darwin = await extensions.addExtension('xdebug', '7.2', 'fedora');
|
||||
expect(darwin).toContain('Platform fedora is not supported');
|
||||
darwin = await extensions.addExtension('xdebug', '7.2', 'openbsd');
|
||||
expect(darwin).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
});
|
||||
|
@ -270,8 +270,8 @@ describe('Tools tests', () => {
|
||||
expect(await tools.getSymfonyUri('1.2.3', 'win32')).toContain(
|
||||
'releases/download/v1.2.3/symfony_windows_amd64'
|
||||
);
|
||||
expect(await tools.getSymfonyUri('1.2.3', 'fedora')).toContain(
|
||||
'Platform fedora is not supported'
|
||||
expect(await tools.getSymfonyUri('1.2.3', 'openbsd')).toContain(
|
||||
'Platform openbsd is not supported'
|
||||
);
|
||||
});
|
||||
|
||||
@ -320,9 +320,9 @@ describe('Tools tests', () => {
|
||||
script = await tools.addArchive(
|
||||
'tool',
|
||||
'https://tool.com/tool.phar',
|
||||
'fedora'
|
||||
'openbsd'
|
||||
);
|
||||
expect(script).toContain('Platform fedora is not supported');
|
||||
expect(script).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking addDevTools', async () => {
|
||||
@ -350,8 +350,8 @@ describe('Tools tests', () => {
|
||||
'Add-Log "$cross" "php-config" "php-config is not a windows tool"'
|
||||
);
|
||||
|
||||
script = await tools.addDevTools('tool', 'fedora');
|
||||
expect(script).toContain('Platform fedora is not supported');
|
||||
script = await tools.addDevTools('tool', 'openbsd');
|
||||
expect(script).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking addPackage', async () => {
|
||||
@ -369,8 +369,8 @@ describe('Tools tests', () => {
|
||||
script = await tools.addPackage('tool', 'tool:1.2.3', 'user/', 'win32');
|
||||
expect(script).toContain('Add-Composertool tool tool:1.2.3 user/');
|
||||
|
||||
script = await tools.addPackage('tool', 'tool:1.2.3', 'user/', 'fedora');
|
||||
expect(script).toContain('Platform fedora is not supported');
|
||||
script = await tools.addPackage('tool', 'tool:1.2.3', 'user/', 'openbsd');
|
||||
expect(script).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking addTools on linux', async () => {
|
||||
|
@ -131,8 +131,8 @@ describe('Utils tests', () => {
|
||||
expect(step_log).toEqual('step_log "Test message"');
|
||||
step_log = await utils.stepLog(message, 'darwin');
|
||||
expect(step_log).toEqual('step_log "Test message"');
|
||||
step_log = await utils.stepLog(message, 'fedora');
|
||||
expect(step_log).toContain('Platform fedora is not supported');
|
||||
step_log = await utils.stepLog(message, 'openbsd');
|
||||
expect(step_log).toContain('Platform openbsd is not supported');
|
||||
|
||||
let add_log: string = await utils.addLog(
|
||||
'tick',
|
||||
@ -145,8 +145,8 @@ describe('Utils tests', () => {
|
||||
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
|
||||
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'darwin');
|
||||
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
|
||||
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'fedora');
|
||||
expect(add_log).toContain('Platform fedora is not supported');
|
||||
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'openbsd');
|
||||
expect(add_log).toContain('Platform openbsd is not supported');
|
||||
});
|
||||
|
||||
it('checking getExtensionPrefix', async () => {
|
||||
@ -163,8 +163,8 @@ describe('Utils tests', () => {
|
||||
expect(await utils.suppressOutput('win32')).toEqual(' >$null 2>&1');
|
||||
expect(await utils.suppressOutput('linux')).toEqual(' >/dev/null 2>&1');
|
||||
expect(await utils.suppressOutput('darwin')).toEqual(' >/dev/null 2>&1');
|
||||
expect(await utils.suppressOutput('fedora')).toContain(
|
||||
'Platform fedora is not supported'
|
||||
expect(await utils.suppressOutput('openbsd')).toContain(
|
||||
'Platform openbsd is not supported'
|
||||
);
|
||||
});
|
||||
|
||||
@ -178,8 +178,8 @@ describe('Utils tests', () => {
|
||||
expect(await utils.getCommand('linux', 'tool')).toBe('add_tool ');
|
||||
expect(await utils.getCommand('darwin', 'tool')).toBe('add_tool ');
|
||||
expect(await utils.getCommand('win32', 'tool')).toBe('Add-Tool ');
|
||||
expect(await utils.getCommand('fedora', 'tool')).toContain(
|
||||
'Platform fedora is not supported'
|
||||
expect(await utils.getCommand('openbsd', 'tool')).toContain(
|
||||
'Platform openbsd is not supported'
|
||||
);
|
||||
});
|
||||
|
||||
@ -191,8 +191,8 @@ describe('Utils tests', () => {
|
||||
expect(await utils.scriptExtension('linux')).toBe('.sh');
|
||||
expect(await utils.scriptExtension('darwin')).toBe('.sh');
|
||||
expect(await utils.scriptExtension('win32')).toBe('.ps1');
|
||||
expect(await utils.scriptExtension('fedora')).toContain(
|
||||
'Platform fedora is not supported'
|
||||
expect(await utils.scriptExtension('openbsd')).toContain(
|
||||
'Platform openbsd is not supported'
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user