Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace / by DIRECTORY_SEPARATOR constant #290

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class MakeExceptionCommandTest extends TestCase
{
protected function setUp(): void
{
Gacela::bootstrap(__DIR__ . '/undefined-folder/');
Gacela::bootstrap(__DIR__ . DIRECTORY_SEPARATOR . 'undefined-folder' . DIRECTORY_SEPARATOR);
}

public function test_make_module_exception_when_composer_file_not_found(): void
Expand Down
6 changes: 4 additions & 2 deletions tests/Feature/Console/CodeGenerator/MakeFileCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@

final class MakeFileCommandTest extends TestCase
{
private const CACHE_DIR = '.' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'TestModule';

public static function tearDownAfterClass(): void
{
DirectoryUtil::removeDir('./src/TestModule');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

public function setUp(): void
{
Gacela::bootstrap(__DIR__);
DirectoryUtil::removeDir('./src/TestModule');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions tests/Feature/Console/CodeGenerator/MakeModuleCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@

final class MakeModuleCommandTest extends TestCase
{
private const CACHE_DIR = '.' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'TestModule';

public static function tearDownAfterClass(): void
{
DirectoryUtil::removeDir('./data/TestModule');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

public function setUp(): void
{
Gacela::bootstrap(__DIR__);
DirectoryUtil::removeDir('./data/TestModule');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions tests/Feature/Framework/FileCache/FileCacheFeatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@

final class FileCacheFeatureTest extends TestCase
{
private const CACHE_DIR = __DIR__ . DIRECTORY_SEPARATOR . 'custom' . DIRECTORY_SEPARATOR . 'cache-dir';

public static function tearDownAfterClass(): void
{
Gacela::bootstrap(__DIR__, static function (GacelaConfig $config): void {
$config->resetInMemoryCache();
$config->setFileCache(false);
});

DirectoryUtil::removeDir(__DIR__ . '/custom/cache-dir');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

protected function setUp(): void
{
DirectoryUtil::removeDir(__DIR__ . '/custom/cache-dir');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

public function test_custom_cache_dir(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

final class FeatureTest extends TestCase
{
private const FACADE_ROOT_DIR = 'tests' . DIRECTORY_SEPARATOR . 'Feature' . DIRECTORY_SEPARATOR
. 'Framework' . DIRECTORY_SEPARATOR . 'UsingAbstractGacelaClassesByDefault';

public function setUp(): void
{
Gacela::bootstrap(__DIR__);
Expand All @@ -18,9 +21,6 @@ public function test_missing_factory_and_config(): void
{
$facade = new Module\Facade();

self::assertStringContainsString(
'tests/Feature/Framework/UsingAbstractGacelaClassesByDefault',
$facade->getAppRootDir(),
);
self::assertStringContainsString(self::FACADE_ROOT_DIR, $facade->getAppRootDir());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

final class DocBlockResolverCustomServicesAwareTest extends TestCase
{
private const CACHE_DIR = __DIR__ . DIRECTORY_SEPARATOR . '.gacela';

public static function setUpBeforeClass(): void
{
DirectoryUtil::removeDir(__DIR__ . '/.gacela');
DirectoryUtil::removeDir(self::CACHE_DIR);
}

protected function setUp(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class DocBlockResolverInMemoryAwareTest extends TestCase
{
public static function setUpBeforeClass(): void
{
DirectoryUtil::removeDir(__DIR__ . '/.gacela');
DirectoryUtil::removeDir(__DIR__ . DIRECTORY_SEPARATOR . '.gacela');
}

protected function setUp(): void
Expand Down
Loading