InteractsWithPublishedFiles
trait InteractsWithPublishedFiles
| internal |
Provides assertion helpers and cleanup utilities for testing file publishing.
Properties
| protected bool | $interactsWithPublishedFilesTeardownRegistered | Determine if trait teardown has been registered. |
|
| protected null|array<int, string> | $cachedExistingMigrationsFiles | List of existing migration files. |
Methods
Setup Interacts with Published Files environment.
Teardown Interacts with Published Files environment.
Cache existing migration files.
Assert file contains the given strings.
Assert file does not contain the given strings.
Assert file does not contain the given strings.
Assert migration file contains the given strings.
Assert migration file does not contain the given strings.
Assert migration file does not contain the given strings.
Assert filename exists.
Assert filename does not exist.
Assert filename does not exist.
Assert migration filename exists.
Assert migration filename does not exist.
Assert migration filename does not exist.
Removes generated files.
Find the first published migration file matching the filename.
Removes generated migration files.
Remove ordinary and migration publications independently.
Normalize a published file entry into a filesystem path.
Details
at line 39
protected void
setUpInteractsWithPublishedFiles()
| internal |
Setup Interacts with Published Files environment.
at line 51
protected void
tearDownInteractsWithPublishedFiles()
| internal |
Teardown Interacts with Published Files environment.
at line 64
protected void
cacheExistingMigrationsFiles()
| internal |
Cache existing migration files.
at line 84
protected void
assertFileContains(array $contains, string $file, string $message = '')
Assert file contains the given strings.
at line 104
protected void
assertFileDoesNotContains(array $contains, string $file, string $message = '')
Assert file does not contain the given strings.
at line 124
protected void
assertFileNotContains(array $contains, string $file, string $message = '')
Assert file does not contain the given strings.
at line 136
protected void
assertMigrationFileContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file contains the given strings.
at line 156
protected void
assertMigrationFileDoesNotContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file does not contain the given strings.
at line 176
protected void
assertMigrationFileNotContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file does not contain the given strings.
at line 186
protected void
assertFilenameExists(string $file)
Assert filename exists.
at line 198
protected void
assertFilenameDoesNotExists(string $file)
Assert filename does not exist.
at line 210
protected void
assertFilenameNotExists(string $file)
Assert filename does not exist.
at line 220
protected void
assertMigrationFileExists(string $file, string|null $directory = null)
Assert migration filename exists.
at line 232
protected void
assertMigrationFileDoesNotExists(string $file, string|null $directory = null)
Assert migration filename does not exist.
at line 244
protected void
assertMigrationFileNotExists(string $file, string|null $directory = null)
Assert migration filename does not exist.
at line 254
protected void
cleanUpPublishedFiles()
| internal |
Removes generated files.
at line 283
protected string|null
findFirstPublishedMigrationFile(string $filename, string|null $directory = null)
Find the first published migration file matching the filename.
at line 297
protected void
cleanUpPublishedMigrationFiles()
| internal |
Removes generated migration files.
at line 328
protected void
cleanUpPublishedFileSets()
Remove ordinary and migration publications independently.
at line 352
protected string
publishedFilePath(string|SplFileInfo $file)
Normalize a published file entry into a filesystem path.