File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed
src/TextUI/Configuration/Xml/Migration
_files/XmlConfigurationMigration
unit/TextUI/Configuration/Xml Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 69
69
'11.0 ' => [
70
70
ReplaceRestrictDeprecationsWithIgnoreDeprecations::class,
71
71
],
72
+
73
+ '11.1 ' => [
74
+ RemoveCoverageElementCacheDirectoryAttribute::class,
75
+ ],
72
76
];
73
77
74
78
/**
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/11.2/phpunit.xsd" >
4
+ <coverage cacheDirectory =" var/.coverage-cache" />
5
+ </phpunit >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/11.3/phpunit.xsd" >
4
+ <coverage />
5
+ </phpunit >
Original file line number Diff line number Diff line change 10
10
namespace PHPUnit \TextUI \XmlConfiguration ;
11
11
12
12
use PHPUnit \Framework \Attributes \TestDox ;
13
+ use PHPUnit \Framework \Attributes \Ticket ;
13
14
use PHPUnit \Framework \TestCase ;
14
15
use PHPUnit \Util \Xml \Loader as XmlLoader ;
15
16
@@ -40,4 +41,18 @@ public function testCanMigratePhpUnit95Configuration(): void
40
41
),
41
42
);
42
43
}
44
+
45
+ #[TestDox('Remove cacheDirectory attribute from <coverage> element when migrating from PHPUnit 11.1 to PHPUnit 11.2 ' )]
46
+ #[Ticket('https://github.com/sebastianbergmann/phpunit/issues/5859 ' )]
47
+ public function testIssue5859 (): void
48
+ {
49
+ $ this ->assertEquals (
50
+ (new XmlLoader )->loadFile (__DIR__ . '/../../../../_files/XmlConfigurationMigration/output-5859.xml ' ),
51
+ (new XmlLoader )->load (
52
+ (new Migrator )->migrate (
53
+ __DIR__ . '/../../../../_files/XmlConfigurationMigration/input-5859.xml ' ,
54
+ ),
55
+ ),
56
+ );
57
+ }
43
58
}
You can’t perform that action at this time.
0 commit comments