Validator test
This commit is contained in:
parent
04cae3c295
commit
535db69152
22
tests/ValidatorTest.php
Normal file
22
tests/ValidatorTest.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace pdt256\Shipping;
|
||||
|
||||
class ValidatorTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException \LogicException
|
||||
*/
|
||||
public function testNull()
|
||||
{
|
||||
Validator::checkIfNull(null, 'null');
|
||||
}
|
||||
|
||||
public function testNotNull()
|
||||
{
|
||||
Validator::checkIfNull('XXX', 'notNullValue');
|
||||
Validator::checkIfNull([], 'notNullValue');
|
||||
Validator::checkIfNull(new \stdClass(), 'notNullValue');
|
||||
Validator::checkIfNull(function() {
|
||||
}, 'notNullValue');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user