Skip to content

Commit

Permalink
Issue #62 Cleans up the root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloelcolombiano committed Apr 25, 2021
1 parent 03a136e commit 4628554
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tmp/
composer.lock
**/test_fixture_factories
.phpunit.result.cache
.env
tests/.env

# These factories are baked by TestFixtureFactoryTaskTest
/tests/TestApp/tests/Factory/*
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ DRIVER=$1;
echo "Starting PHPUNIT tests"
export DB_DRIVER=$DRIVER

./vendor/bin/phpunit
./vendor/bin/phpunit
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@
putenv('DB_DRIVER=Sqlite');
}
$driver = getenv('DB_DRIVER');
$testDir = ROOT . DS . 'tests' . DS;

if (!file_exists(ROOT . DS . '.env')) {
@copy(".env.$driver", ROOT . DS . '.env');
if (!file_exists("$testDir.env")) {
@copy("$testDir.env.$driver", "$testDir.env");
}

/**
* Read .env file(s).
*/
$loadEnv(ROOT . DS . '.env');
$loadEnv("$testDir.env");

// Re-read the driver
$driver = getenv('DB_DRIVER');
Expand Down

0 comments on commit 4628554

Please sign in to comment.