ShippingRates/tests/ValidatorTest.php
Pereyaslov Konstantin 535db69152 Validator test
2014-12-08 22:36:06 +03:00

23 lines
532 B
PHP

<?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');
}
}