| 1 | <?php |
||
| 14 | class EnvironmentLoaderSpec extends ObjectBehavior |
||
| 15 | { |
||
| 16 | function it_should_load_from_dot_env(WorkingDirectory $workingDirectory) |
||
| 17 | { |
||
| 18 | $workingDirectory->getCurrentDirectoryAbsolute()->willReturn(__DIR__ . DIRECTORY_SEPARATOR . 'fixture'); |
||
| 19 | $this->load($workingDirectory); |
||
| 20 | expect($_ENV['DATABASE_USER'])->shouldBe('[user]'); |
||
| 21 | expect($_ENV['DATABASE_PASSWORD'])->shouldBe('[password]'); |
||
| 22 | expect($_ENV['DATABASE_PORT'])->shouldBe('[port]'); |
||
| 23 | expect($_ENV['DATABASE_NAME'])->shouldBe('[database]'); |
||
| 24 | expect($_ENV['PROVISIONING_TABLE'])->shouldBe('changelog_database_deployments'); |
||
| 25 | expect($_ENV['PROVISIONING_TABLE_CANDIDATE_NUMBER_COLUMN'])->shouldBe('deploy_script_number'); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |