Skip to content

Commit

Permalink
Clean up and normalize code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 30, 2024
1 parent 9b072cb commit 00943e3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/testing/src/CreatesTemporaryFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ trait CreatesTemporaryFiles

/**
* Create a temporary file in the project directory.
* The TestCase will automatically remove the file when the test is completed.
*
* The test case will automatically remove the file when the test is completed.
*/
protected function file(string $path, ?string $contents = null): void
{
Expand All @@ -36,7 +37,8 @@ protected function file(string $path, ?string $contents = null): void

/**
* Create a temporary directory in the project directory.
* The TestCase will automatically remove the entire directory when the test is completed.
*
* The test case will automatically remove the entire directory when the test is completed.
*/
protected function directory(string $path): void
{
Expand All @@ -46,13 +48,16 @@ protected function directory(string $path): void
}

/**
* Create a temporary Markdown+FrontMatter file in the project directory.
* Create a temporary Markdown file with front matter in the project directory.
*/
protected function markdown(string $path, string $contents = '', array $matter = []): void
{
$this->file($path, (new ConvertsArrayToFrontMatter())->execute($matter).$contents);
}

/**
* Clean up the filesystem after the test has completed.
*/
protected function cleanUpFilesystem(): void
{
if (sizeof($this->fileMemory) > 0) {
Expand Down

0 comments on commit 00943e3

Please sign in to comment.