Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Load Magento classes when starting tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Schmidt committed Apr 20, 2015
1 parent 78d72e6 commit f010fbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/LinusShops/Prophet/Commands/Scry.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace LinusShops\Prophet\Commands;

use LinusShops\Prophet\Magento;
use LinusShops\Prophet\ProphetCommand;
use LinusShops\Prophet\TestRunner;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -37,6 +38,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

$output->writeln('Loading Magento classes');

Magento::bootstrap();

foreach ($this->modules as $module) {
$output->writeln('Starting tests for ['.$module['name'].']');

Expand Down
4 changes: 2 additions & 2 deletions src/LinusShops/Prophet/Magento.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function bootstrap()
require_once($file);
}

Varien_Autoload::register();
\Varien_Autoload::register();

$mageFilename = 'app/Mage.php';

Expand All @@ -47,7 +47,7 @@ public static function bootstrap()

require_once $mageFilename;

Mage::init();
\Mage::init();

self::$loaded = true;
}
Expand Down

0 comments on commit f010fbe

Please sign in to comment.