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.
Normalize a published file entry into a filesystem path.
Details
at line 36
protected void
setUpInteractsWithPublishedFiles()
| internal |
Setup Interacts with Published Files environment.
at line 49
protected void
tearDownInteractsWithPublishedFiles()
| internal |
Teardown Interacts with Published Files environment.
at line 64
protected void
cacheExistingMigrationsFiles()
| internal |
Cache existing migration files.
at line 78
protected void
assertFileContains(array $contains, string $file, string $message = '')
Assert file contains the given strings.
at line 96
protected void
assertFileDoesNotContains(array $contains, string $file, string $message = '')
Assert file does not contain the given strings.
at line 114
protected void
assertFileNotContains(array $contains, string $file, string $message = '')
Assert file does not contain the given strings.
at line 124
protected void
assertMigrationFileContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file contains the given strings.
at line 142
protected void
assertMigrationFileDoesNotContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file does not contain the given strings.
at line 160
protected void
assertMigrationFileNotContains(array $contains, string $file, string $message = '', string|null $directory = null)
Assert migration file does not contain the given strings.
at line 168
protected void
assertFilenameExists(string $file)
Assert filename exists.
at line 178
protected void
assertFilenameDoesNotExists(string $file)
Assert filename does not exist.
at line 188
protected void
assertFilenameNotExists(string $file)
Assert filename does not exist.
at line 196
protected void
assertMigrationFileExists(string $file, string|null $directory = null)
Assert migration filename exists.
at line 206
protected void
assertMigrationFileDoesNotExists(string $file, string|null $directory = null)
Assert migration filename does not exist.
at line 216
protected void
assertMigrationFileNotExists(string $file, string|null $directory = null)
Assert migration filename does not exist.
at line 226
protected void
cleanUpPublishedFiles()
| internal |
Removes generated files.
at line 242
protected string|null
findFirstPublishedMigrationFile(string $filename, string|null $directory = null)
Find the first published migration file matching the filename.
at line 256
protected void
cleanUpPublishedMigrationFiles()
| internal |
Removes generated migration files.
at line 270
protected string
publishedFilePath(string|SplFileInfo $file)
Normalize a published file entry into a filesystem path.