@@ -7,7 +7,6 @@ final class FontConfigTests: XCTestCase {
7
7
private var mockFileManager : MockFileManager !
8
8
private var mockBundle : MockBundle !
9
9
private var mockLibraryWrapper : MockLibraryWrapper . Type !
10
- private var mockUUID : UUID !
11
10
12
11
private var cachesDirectory : URL {
13
12
if #available( iOS 16 . 0 , tvOS 16 . 0 , visionOS 1 . 0 , macOS 13 . 0 , * ) {
@@ -41,7 +40,6 @@ final class FontConfigTests: XCTestCase {
41
40
mockFileManager = MockFileManager ( )
42
41
mockBundle = MockBundle ( )
43
42
mockLibraryWrapper = MockLibraryWrapper . self
44
- mockUUID = UUID ( )
45
43
}
46
44
47
45
func createConfig(
@@ -52,7 +50,6 @@ final class FontConfigTests: XCTestCase {
52
50
fontProvider: FontProvider = . fontConfig
53
51
) -> FontConfig {
54
52
FontConfig (
55
- uuid: { self . mockUUID } ,
56
53
fileManager: mockFileManager,
57
54
moduleBundle: mockBundle,
58
55
libraryWrapper: mockLibraryWrapper,
@@ -76,9 +73,7 @@ final class FontConfigTests: XCTestCase {
76
73
try config. configure ( library: library, renderer: renderer)
77
74
78
75
// THEN
79
- let expectedURL = defaultFontsCachePath
80
- . appendingPathComponent ( mockUUID. uuidString)
81
- . appendingPathComponent ( " fonts-cache " )
76
+ let expectedURL = defaultFontsCachePath. appendingPathComponent ( " fonts-cache " )
82
77
XCTAssert ( mockFileManager. createDirectoryFunc. wasCalled ( with: expectedURL) )
83
78
}
84
79
@@ -107,9 +102,7 @@ final class FontConfigTests: XCTestCase {
107
102
try config. configure ( library: library, renderer: renderer)
108
103
109
104
// THEN
110
- let expectedURL = fontsCachePath
111
- . appendingPathComponent ( mockUUID. uuidString)
112
- . appendingPathComponent ( " fonts-cache " )
105
+ let expectedURL = fontsCachePath. appendingPathComponent ( " fonts-cache " )
113
106
XCTAssert ( mockFileManager. createDirectoryFunc. wasCalled ( with: expectedURL) )
114
107
}
115
108
@@ -126,10 +119,7 @@ final class FontConfigTests: XCTestCase {
126
119
// THEN
127
120
let createFileArgument = try XCTUnwrap ( mockFileManager. createItemFunc. argument)
128
121
let expectedDir = fontsPath. path
129
- let expectedCacheDir = fontsCachePath
130
- . appendingPathComponent ( mockUUID. uuidString)
131
- . appendingPathComponent ( " fonts-cache " )
132
- . path
122
+ let expectedCacheDir = fontsCachePath. appendingPathComponent ( " fonts-cache " ) . path
133
123
let expectedConfFile = cachesDirectory. appendingPathComponent ( " fonts.conf " )
134
124
let expectedContents = """
135
125
<?xml version= " 1.0 " ?>
0 commit comments