Skip to content

Commit

Permalink
Get save handler from container
Browse files Browse the repository at this point in the history
The config may be initialized differently than from env
  • Loading branch information
glensc committed Oct 30, 2020
1 parent 087623f commit 0e19ede
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace XHGui\Test;

use XHGui\Saver\SaverInterface;
use XHGui\ServiceContainer;

abstract class TestCase extends \PHPUnit\Framework\TestCase
{
Expand All @@ -20,7 +21,8 @@ protected function loadFixture(SaverInterface $saver, string $fileName = 'result

protected function skipIfPdo($details = null)
{
$saveHandler = getenv('XHGUI_SAVE_HANDLER');
$saveHandler = ServiceContainer::instance()['config']['save.handler'];

if ($saveHandler !== 'pdo') {
return;
}
Expand Down

0 comments on commit 0e19ede

Please sign in to comment.