Skip to content

Commit

Permalink
in line with change from file_exists() to is_readable(), change from …
Browse files Browse the repository at this point in the history
…NotFound to NotReadable
  • Loading branch information
Paul M. Jones committed Dec 29, 2011
1 parent fc94c1a commit 92810fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
require_once __DIR__ . '/src/Aura/Autoload/Loader.php';
require_once __DIR__ . '/src/Aura/Autoload/Exception.php';
require_once __DIR__ . '/src/Aura/Autoload/Exception/AlreadyLoaded.php';
require_once __DIR__ . '/src/Aura/Autoload/Exception/NotFound.php';
require_once __DIR__ . '/src/Aura/Autoload/Exception/NotReadable.php';
require_once __DIR__ . '/src/Aura/Autoload/Exception/NotDefined.php';
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
* @package Aura.Autoload
*
*/
class NotFound extends \Aura\Autoload\Exception {}
class NotReadable extends \Aura\Autoload\Exception {}
4 changes: 2 additions & 2 deletions src/Aura/Autoload/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function getLoaded()
*
* @return void
*
* @throws Exception\NotFound when the file for the class or
* @throws Exception\NotReadable when the file for the class or
* interface is not found.
*
*/
Expand Down Expand Up @@ -302,7 +302,7 @@ public function load($spec)
// yes, throw an exception
$message = $spec . PHP_EOL
. implode(PHP_EOL, $this->tried_paths);
throw new Exception\NotFound($message);
throw new Exception\NotReadable($message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Aura/Autoload/LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testLoadMissing()

// missing in normal mode should throw exception
$autoloader->setMode(Loader::MODE_NORMAL);
$this->setExpectedException('Aura\Autoload\Exception\NotFound');
$this->setExpectedException('Aura\Autoload\Exception\NotReadable');
$autoloader->load($class);
}

Expand All @@ -102,7 +102,7 @@ public function testLoadUndeclared()
}

/**
* @expectedException \Aura\Autoload\Exception\NotFound
* @expectedException \Aura\Autoload\Exception\NotReadable
*/
public function testLoadNotInIncludePath()
{
Expand Down

0 comments on commit 92810fe

Please sign in to comment.