Browse Source

replace Exception GeneralException

master
Vyacheslav Agafonov 13 years ago
parent
commit
acc0c96487
  1. 3
      tests/validator/EqualValidatorTest.php
  2. 5
      tests/validator/RegexValidatorTest.php

3
tests/validator/EqualValidatorTest.php

@ -13,6 +13,7 @@
require_once dirname(__FILE__) . '/../../validator/iValidator.php';
require_once dirname(__FILE__) . '/../../validator/Validator.php';
require_once dirname(__FILE__) . '/../../validator/EqualValidator.php';
require_once dirname(__FILE__) . '/../../exception/InitializationException.php';
class EqualValidatorTest extends PHPUnit_Framework_TestCase
{
@ -24,7 +25,7 @@ class EqualValidatorTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException InitializationException
* @expectedExceptionMessage Token not defined
*/
public function testNullToken()

5
tests/validator/RegexValidatorTest.php

@ -13,6 +13,7 @@
require_once dirname(__FILE__) . '/../../validator/iValidator.php';
require_once dirname(__FILE__) . '/../../validator/Validator.php';
require_once dirname(__FILE__) . '/../../validator/RegexValidator.php';
require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
class RegexValidatorTest extends PHPUnit_Framework_TestCase
{
@ -45,7 +46,7 @@ class RegexValidatorTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage Message template "regex_not_match" unknown.
*/
public function testNullMessage()
@ -66,7 +67,7 @@ class RegexValidatorTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage regex
*/
public function testRegexReturnsFalse()

Loading…
Cancel
Save