@@ -418,10 +418,6 @@ public function hasGitattributesFileFailsOnNonExistingGitattributesFile(): void
418418 #[Test]
419419 public function collectExpectedExportIgnoresReturnsExpectedEntries (): void
420420 {
421- $ temporaryGitattributesFile = $ this ->temporaryDirectory
422- . DIRECTORY_SEPARATOR
423- . '.gitattributes ' ;
424-
425421 $ artifactFilenames = [
426422 'README.md ' ,
427423 'Makefile ' ,
@@ -434,7 +430,7 @@ public function collectExpectedExportIgnoresReturnsExpectedEntries(): void
434430 ['documentation ' ]
435431 );
436432
437- $ expectedExportIgnores = [
433+ $ expectedExportIgnores =[
438434 '.buildignore ' ,
439435 '.travis.yml ' ,
440436 'documentation/ ' ,
@@ -446,6 +442,9 @@ public function collectExpectedExportIgnoresReturnsExpectedEntries(): void
446442
447443 $ actualExportIgnores = $ analyser ->collectExpectedExportIgnores ();
448444
445+ \sort ($ expectedExportIgnores );
446+ \sort ($ actualExportIgnores );
447+
449448 $ this ->assertEquals (
450449 $ expectedExportIgnores ,
451450 $ actualExportIgnores
@@ -1526,51 +1525,58 @@ public function returnsExpectedDefaultGlobPatterns(): void
15261525 $ analyser = (new Analyser (new Finder (new PhpPreset ())))->setDirectory ($ this ->temporaryDirectory );
15271526
15281527 $ expectedDefaultGlobPatterns = [
1529- '.* ' ,
1528+ '*.dist ' ,
1529+ '*.dist.* ' ,
15301530 '*.lock ' ,
1531- '*.txt ' ,
15321531 '*.rst ' ,
1533- '*.{md,MD} ' ,
1534- '*.{png,gif,jpeg,jpg,webp} ' ,
1532+ '*.toml ' ,
1533+ '*.txt ' ,
15351534 '*.xml ' ,
15361535 '*.yml ' ,
1537- '*.toml ' ,
1538- 'phpunit* ' ,
1539- 'appveyor.yml ' ,
1540- 'box.json ' ,
1541- 'composer-dependency-analyser* ' ,
1542- 'collision-detector* ' ,
1543- 'captainhook.json ' ,
1544- 'peck.json ' ,
1545- 'infection* ' ,
1546- 'phpstan* ' ,
1547- 'sonar* ' ,
1548- 'rector* ' ,
1549- 'phpkg.con* ' ,
1550- 'package* ' ,
1551- 'pint.json ' ,
1552- 'renovate.json ' ,
1553- '*debugbar.json ' ,
1554- 'ecs* ' ,
1555- 'llms.* ' ,
1556- '*.dist.* ' ,
1557- '*.dist ' ,
1558- '{B,b}uild* ' ,
1559- '{D,d}oc* ' ,
1560- '{T,t}ool* ' ,
1561- '{T,t}est* ' ,
1562- '{S,s}pec* ' ,
1563- '{A,a}rt* ' ,
1564- '{A,a}sset* ' ,
1565- '{E,e}xample* ' ,
1566- 'LICENSE ' ,
1567- '{{M,m}ake,{B,b}ox,{V,v}agrant,{P,p}hulp}file ' ,
1568- 'RMT '
1536+ '*.{md,MD} ' ,
1537+ '*.{png,gif,jpeg,jpg,webp} ' ,
1538+ '*debugbar.json ' ,
1539+ '.* ' ,
1540+ 'LICENSE ' ,
1541+ 'RMT ' ,
1542+ 'appveyor.yml ' ,
1543+ 'box.json ' ,
1544+ 'captainhook.json ' ,
1545+ 'collision-detector* ' ,
1546+ 'composer-dependency-analyser* ' ,
1547+ 'ecs* ' ,
1548+ 'infection* ' ,
1549+ 'llms.* ' ,
1550+ 'package* ' ,
1551+ 'peck.json ' ,
1552+ 'phpkg.con* ' ,
1553+ 'phpstan* ' ,
1554+ 'phpunit* ' ,
1555+ 'pint.json ' ,
1556+ 'rector* ' ,
1557+ 'renovate.json ' ,
1558+ 'sonar* ' ,
1559+ '{A,a}rt* ' ,
1560+ '{A,a}sset* ' ,
1561+ '{B,b}uild* ' ,
1562+ '{D,d}ist ' ,
1563+ '{D,d}oc* ' ,
1564+ '{E,e}xample* ' ,
1565+ '{M,m}ake ' ,
1566+ '{S,s}pec* ' ,
1567+ '{T,t}est* ' ,
1568+ '{T,t}ool* ' ,
1569+ '{{M,m}ake,{B,b}ox,{V,v}agrant,{P,p}hulp}file ' ,
15691570 ];
15701571
1572+ $ defaultGlobPattern = $ analyser ->getDefaultGlobPattern ();
1573+
1574+ \sort ($ defaultGlobPattern );
1575+ \sort ($ expectedDefaultGlobPatterns );
1576+
15711577 $ this ->assertEquals (
15721578 $ expectedDefaultGlobPatterns ,
1573- $ analyser -> getDefaultGlobPattern ()
1579+ $ defaultGlobPattern
15741580 );
15751581 }
15761582}
0 commit comments