More strict test on autoload

This commit is contained in:
Anton Terekhov
2012-11-21 14:31:43 +04:00
parent fa67637c67
commit a789ad8966

View File

@ -150,12 +150,11 @@ class LoadTest extends PHPUnit_Framework_TestCase
$this->setConstants(); $this->setConstants();
Load::setAutoloadFrom(self::$file); Load::setAutoloadFrom(self::$file);
$autoload = require(self::$file); $autoload = require(self::$file);
$this->setExpectedException('PHPUnit_Framework_Error'); $this->setExpectedException('PHPUnit_Framework_Error', 'Undefined index');
$this->assertNotEmpty(Load::getFilePath('anton')); $this->assertNotEmpty(Load::getFilePath('ClassDontExist'));
} }
/** /**
* @TODO: Load::autoload() needs self::$autoload = require(self::$file); after self::buildAutoload();
* @runInSeparateProcess * @runInSeparateProcess
*/ */
public function testDebugAutoload() public function testDebugAutoload()