1- import { getComposerPhpVer } from "../../src/options.mjs" ;
1+ import { getComposerPhpVersion } from "../../src/options.mjs" ;
22import fs from "fs" ;
33import path from "path" ;
44import os from "os" ;
@@ -51,7 +51,7 @@ describe("getComposerPhpVer", () => {
5151
5252 process . chdir ( emptyDir ) ;
5353
54- expect ( getComposerPhpVer ( ) ) . toBe ( null ) ;
54+ expect ( getComposerPhpVersion ( ) ) . toBe ( null ) ;
5555 } ) ;
5656
5757 test . each ( [
@@ -76,7 +76,7 @@ describe("getComposerPhpVer", () => {
7676 fs . writeFileSync ( tempComposerPath , composerContent ) ;
7777
7878
79- expect ( getComposerPhpVer ( ) ) . toBe ( expected ) ;
79+ expect ( getComposerPhpVersion ( ) ) . toBe ( expected ) ;
8080 } ) ;
8181
8282 test ( "returns null when composer.json has no PHP requirement" , ( ) => {
@@ -95,7 +95,7 @@ describe("getComposerPhpVer", () => {
9595
9696 process . chdir ( tempDir ) ;
9797
98- expect ( getComposerPhpVer ( ) ) . toBe ( null ) ;
98+ expect ( getComposerPhpVersion ( ) ) . toBe ( null ) ;
9999 } ) ;
100100
101101 test ( "returns null when composer.json has invalid PHP requirement" , ( ) => {
@@ -113,7 +113,7 @@ describe("getComposerPhpVer", () => {
113113
114114 process . chdir ( tempDir ) ;
115115
116- expect ( getComposerPhpVer ( ) ) . toBe ( null ) ;
116+ expect ( getComposerPhpVersion ( ) ) . toBe ( null ) ;
117117 } ) ;
118118
119119 test ( "finds composer.json in parent directory when in nested child folder" , ( ) => {
@@ -141,7 +141,7 @@ describe("getComposerPhpVer", () => {
141141
142142 process . chdir ( nestedDir3 ) ;
143143
144- expect ( getComposerPhpVer ( ) ) . toBe ( "8.1" ) ;
144+ expect ( getComposerPhpVersion ( ) ) . toBe ( "8.1" ) ;
145145 } ) ;
146146
147147 test ( "finds composer.json in intermediate parent directory" , ( ) => {
@@ -170,7 +170,7 @@ describe("getComposerPhpVer", () => {
170170
171171 process . chdir ( nestedDir3 ) ;
172172
173- expect ( getComposerPhpVer ( ) ) . toBe ( "7.2" ) ;
173+ expect ( getComposerPhpVersion ( ) ) . toBe ( "7.2" ) ;
174174 } ) ;
175175
176176 test ( "returns null when composer.json is malformed" , ( ) => {
@@ -189,6 +189,6 @@ describe("getComposerPhpVer", () => {
189189
190190 process . chdir ( tempDir ) ;
191191
192- expect ( getComposerPhpVer ( ) ) . toBe ( null ) ;
192+ expect ( getComposerPhpVersion ( ) ) . toBe ( null ) ;
193193 } ) ;
194194} ) ;
0 commit comments