1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

Fixing typo and fixing type tests

This commit is contained in:
Michael Dowling 2012-05-06 23:24:02 -07:00
parent 0c51598851
commit 023662e5c2
3 changed files with 6 additions and 4 deletions

View File

@ -21,8 +21,8 @@ abstract class AbstractType extends AbstractConstraint
$type = (string) $options['type'];
if (!isset(static::$typeMapping[$type])) {
throw new InvalidArgumentException("{$type} is not one "
. 'the mapped types: ' . array_keys(self::$typeMapping));
throw new InvalidArgumentException("{$type} is not one of the "
. 'mapped types: ' . array_keys(self::$typeMapping));
}
$method = static::$typeMapping[$type];

View File

@ -17,7 +17,7 @@ class CtypeTest extends Validation
array($c, 'a', array('alpha'), true, null),
array($c, '2', array('type' => 'alpha'), 'Value must be of type alpha', null),
array($c, ' ', array('type' => 'space'), true, null),
array($c, 'a', array('foo'), null, 'Guzzle\Common\Exception\InvalidArgumentException')
array($c, 'a', array('type' => 'foo'), null, 'Guzzle\Common\Exception\InvalidArgumentException')
);
}
}

View File

@ -18,7 +18,9 @@ class Validation extends \Guzzle\Tests\GuzzleTestCase
throw $e;
}
$this->assertInstanceOf($exception, $e);
if (!($e instanceof $exception)) {
throw $e;
}
}
}
}