From 9457ce6e2b6c2cf6ff29d195e090eeb64ed13267 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 19 Aug 2020 08:00:36 +0530 Subject: [PATCH] Replace fedora with valid platform name --- __tests__/config.test.ts | 12 ++++++------ __tests__/extensions.test.ts | 12 ++++++------ __tests__/tools.test.ts | 16 ++++++++-------- __tests__/utils.test.ts | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/__tests__/config.test.ts b/__tests__/config.test.ts index 920ad233..e5b490c1 100644 --- a/__tests__/config.test.ts +++ b/__tests__/config.test.ts @@ -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'); }); }); diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index 740928a1..94f069ed 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -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'); }); }); diff --git a/__tests__/tools.test.ts b/__tests__/tools.test.ts index fdbaacc5..db64bcae 100644 --- a/__tests__/tools.test.ts +++ b/__tests__/tools.test.ts @@ -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 () => { diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 79f04a41..d8bd303e 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -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' ); });