Refactored ValidationException (-> InvalidArgumentException).
This commit is contained in:
parent
cdc926c62a
commit
2a3adf25af
20 changed files with 79 additions and 91 deletions
|
|
@ -4,6 +4,7 @@ namespace Tests\PHPCensor;
|
|||
|
||||
use PHPCensor\Config;
|
||||
use PHPCensor\Database;
|
||||
use PHPCensor\Exception\InvalidArgumentException;
|
||||
use PHPCensor\Store\Factory;
|
||||
use PHPCensor\Model\Project;
|
||||
use PHPCensor\Model\ProjectGroup;
|
||||
|
|
@ -164,7 +165,7 @@ class StorePostgresqlTest extends \PHPUnit_Extensions_Database_TestCase
|
|||
|
||||
try {
|
||||
$data = $testStore->getWhere(['' => 0], 100, 0, ['id' => 'ASC']);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (InvalidArgumentException $e) {
|
||||
self::assertEquals('You cannot have an empty field name.', $e->getMessage());
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +229,7 @@ class StorePostgresqlTest extends \PHPUnit_Extensions_Database_TestCase
|
|||
$model->setId(1);
|
||||
|
||||
$testStore->save($model);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (InvalidArgumentException $e) {
|
||||
self::assertEquals(
|
||||
'PHPCensor\Model\Project is an invalid model type for this store.',
|
||||
$e->getMessage()
|
||||
|
|
@ -253,7 +254,7 @@ class StorePostgresqlTest extends \PHPUnit_Extensions_Database_TestCase
|
|||
$model->setId(1);
|
||||
|
||||
$testStore->delete($model);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
} catch (InvalidArgumentException $e) {
|
||||
self::assertEquals(
|
||||
'PHPCensor\Model\Project is an invalid model type for this store.',
|
||||
$e->getMessage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue