Skip to content

Commit

Permalink
adds testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
basz authored and Ocramius committed Feb 2, 2015
1 parent c4a531d commit 2069b36
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ZendTest/Loader/ModuleAutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ public function testCanAutoloadPharModules()
$loader->unregister();
}

public function testCanAutoloadModulesFromWithinExecutedPhar()
{
$loader = new ModuleAutoloader;

$class = new \ReflectionClass('Zend\Loader\ModuleAutoloader');
$property = $class->getProperty("pharBasePath");
$property->setAccessible(true);
$property->setValue($loader, 'phar://' . __DIR__ . '/_files/ApplicationModulePhar.phar');

$loader->registerPath('./module');
$loader->register();
$this->assertTrue(class_exists('Application\Module'));
}

public function testProvidesFluidInterface()
{
$loader = new ModuleAutoloader;
Expand Down
Binary file not shown.

0 comments on commit 2069b36

Please sign in to comment.