Skip to content

Commit

Permalink
Make methods chainable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 9, 2024
1 parent f490b2d commit deecd2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ protected function composerReload()
(new Process($command, base_path(), ['COMPOSER_MEMORY_LIMIT' => '-1']))
->setTimeout(null)
->run(function ($type, $output) {});

return $this;
}

protected function cleanSlate()
Expand All @@ -157,11 +159,15 @@ protected function cleanSlate()
File::deleteDirectory(app_path('Models'));

File::deleteDirectory(base_path('bootstrap/cache/ddd'));

return $this;
}

protected function cleanStubs()
{
File::cleanDirectory(base_path('stubs'));

return $this;
}

protected function setupTestApplication()
Expand All @@ -173,6 +179,8 @@ protected function setupTestApplication()
File::ensureDirectoryExists(app_path('Models'));

$this->setDomainPathInComposer('Domain', 'src/Domain');

return $this;
}

protected function setDomainPathInComposer($domainNamespace, $domainPath, bool $reload = true)
Expand Down

0 comments on commit deecd2c

Please sign in to comment.