mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Specify version in phpenmod and phpdismod
This commit is contained in:
parent
e755fb7a69
commit
f7f5b1a7e1
@ -27,7 +27,7 @@ describe('Config tests', () => {
|
|||||||
let linux: string = await coverage.addCoverage('pcov', '7.4', 'linux');
|
let linux: string = await coverage.addCoverage('pcov', '7.4', 'linux');
|
||||||
expect(linux).toContain('addExtension pcov');
|
expect(linux).toContain('addExtension pcov');
|
||||||
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file');
|
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file');
|
||||||
expect(linux).toContain('sudo phpdismod xdebug');
|
expect(linux).toContain('sudo phpdismod -v 7.4 xdebug');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('checking addCoverage with PCOV on darwin', async () => {
|
it('checking addCoverage with PCOV on darwin', async () => {
|
||||||
@ -58,8 +58,8 @@ describe('Config tests', () => {
|
|||||||
|
|
||||||
it('checking disableCoverage on linux', async () => {
|
it('checking disableCoverage on linux', async () => {
|
||||||
let linux: string = await coverage.addCoverage('none', '7.4', 'linux');
|
let linux: string = await coverage.addCoverage('none', '7.4', 'linux');
|
||||||
expect(linux).toContain('sudo phpdismod xdebug');
|
expect(linux).toContain('sudo phpdismod -v 7.4 xdebug');
|
||||||
expect(linux).toContain('sudo phpdismod pcov');
|
expect(linux).toContain('sudo phpdismod -v 7.4 pcov');
|
||||||
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file');
|
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file');
|
||||||
expect(linux).toContain('sudo sed -i "/pcov/d" $ini_file');
|
expect(linux).toContain('sudo sed -i "/pcov/d" $ini_file');
|
||||||
});
|
});
|
||||||
|
@ -57,7 +57,9 @@ function addCoveragePCOV(version, os_version) {
|
|||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/xdebug.ini ]; then sudo phpdismod xdebug; fi\n';
|
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' xdebug; fi\n';
|
||||||
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
||||||
break;
|
break;
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
@ -89,11 +91,15 @@ function disableCoverage(version, os_version) {
|
|||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/xdebug.ini ]; then sudo phpdismod xdebug; fi\n';
|
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' xdebug; fi\n';
|
||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/pcov.ini ]; then sudo phpdismod pcov; fi\n';
|
'/mods-available/pcov.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' pcov; fi\n';
|
||||||
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
||||||
script += 'sudo sed -i "/pcov/d" $ini_file\n';
|
script += 'sudo sed -i "/pcov/d" $ini_file\n';
|
||||||
break;
|
break;
|
||||||
|
@ -56,7 +56,9 @@ export async function addCoveragePCOV(version: string, os_version: string) {
|
|||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/xdebug.ini ]; then sudo phpdismod xdebug; fi\n';
|
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' xdebug; fi\n';
|
||||||
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
||||||
break;
|
break;
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
@ -98,11 +100,15 @@ export async function disableCoverage(version: string, os_version: string) {
|
|||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/xdebug.ini ]; then sudo phpdismod xdebug; fi\n';
|
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' xdebug; fi\n';
|
||||||
script +=
|
script +=
|
||||||
'if [ -e /etc/php/' +
|
'if [ -e /etc/php/' +
|
||||||
version +
|
version +
|
||||||
'/mods-available/pcov.ini ]; then sudo phpdismod pcov; fi\n';
|
'/mods-available/pcov.ini ]; then sudo phpdismod -v ' +
|
||||||
|
version +
|
||||||
|
' pcov; fi\n';
|
||||||
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
|
||||||
script += 'sudo sed -i "/pcov/d" $ini_file\n';
|
script += 'sudo sed -i "/pcov/d" $ini_file\n';
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user