Skip to content

Commit

Permalink
Merge pull request #294 from glensc/saver-generic
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Aug 25, 2020
2 parents 7d22da6 + a9ec9bc commit 666c34d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions external/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
}

$container = Xhgui_ServiceContainer::instance();
$saver = $container['saver.mongo'];

/** @var Xhgui_Saver_Interface $saver */
$saver = $container['saver'];

while (!feof($fp)) {
$line = fgets($fp);
Expand Down
5 changes: 3 additions & 2 deletions tests/Controller/ImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
use XHGui\Test\TestCase;
use Xhgui_Controller_Import;
use Xhgui_Profile;
use Xhgui_Searcher_Interface;
use Xhgui_ServiceContainer;

class ImportTest extends TestCase
{
/** @var Xhgui_Searcher_Interface */
private $profiles;
/** @var Xhgui_Controller_Import */
private $import;
Expand All @@ -33,9 +35,8 @@ public function setUp()
return $mock;
});
$this->import = $di['importController'];
$this->app = $di['app'];

$this->profiles = $di['searcher.mongo'];
$this->profiles = $di['searcher'];
$this->profiles->truncate();
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/RunTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function setUp()
$this->import = $di['importController'];
$this->runs = $di['runController'];
$this->app = $di['app'];
$this->profiles = $di['searcher.mongo'];
$this->profiles = $di['searcher'];
$this->profiles->truncate();
$this->saver = $di['saver.mongo'];
$this->saver = $di['saver'];
}

public function testIndexEmpty()
Expand Down

0 comments on commit 666c34d

Please sign in to comment.