Browse Source

Removed expectation exceptions

master
Vyacheslav Agafonov 13 years ago
parent
commit
c6b48f084d
  1. 8
      tests/util/AutoloadBuilderTest.php

8
tests/util/AutoloadBuilderTest.php

@ -34,8 +34,6 @@ class AutoloadBuilderTest extends PHPUnit_Framework_TestCase
/** /**
* @TODO: Load->buildAutoload() - uses two paths - PATH . '/' . APP . '/src' and PATH . '/lib' those are not checked. Can couse error. * @TODO: Load->buildAutoload() - uses two paths - PATH . '/' . APP . '/src' and PATH . '/lib' those are not checked. Can couse error.
* @expectedException UnexpectedValueException
* @expectedException PHPUnit_Framework_Error
*/ */
public static function setUpBeforeClass() public static function setUpBeforeClass()
{ {
@ -58,11 +56,11 @@ class AutoloadBuilderTest extends PHPUnit_Framework_TestCase
/** /**
* @TODO: AutoloadBuilder - check input params: string for filename, array for dirs * @TODO: AutoloadBuilder - check input params: string for filename, array for dirs
* @expectedException PHPUnit_Framework_Error
* @runInSeparateProcess * @runInSeparateProcess
*/ */
public function testBuildParams() public function testBuildParams()
{ {
$this->setExpectedException('PHPUnit_Framework_Error');
$this->setConstants(); $this->setConstants();
$autoload = self::$file; $autoload = self::$file;
$dirs = 'string'; $dirs = 'string';
@ -82,18 +80,18 @@ class AutoloadBuilderTest extends PHPUnit_Framework_TestCase
$builder->build(); $builder->build();
$this->assertFileExists(self::$file); $this->assertFileExists(self::$file);
$array = require self::$file; $array = require self::$file;
$this->assertInternalType('array', $array); $this->assertInternalType('array', $array);
$this->assertNotEmpty($array); $this->assertNotEmpty($array);
} }
/** /**
* @expectedException PHPUnit_Framework_Error
* @runInSeparateProcess * @runInSeparateProcess
*/ */
public function testAccessDenied() public function testAccessDenied()
{ {
$this->setExpectedException('PHPUnit_Framework_Error');
$this->setConstants(); $this->setConstants();
chmod(self::$file, 0400); chmod(self::$file, 0400);
$builder = new AutoloadBuilder(self::$file, array(self::$path . '/' . self::$app . '/src', self::$path . '/' . self::$app . '/cache', self::$path . '/lib')); $builder = new AutoloadBuilder(self::$file, array(self::$path . '/' . self::$app . '/src', self::$path . '/' . self::$app . '/cache', self::$path . '/lib'));

Loading…
Cancel
Save