You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShippingRates/tests/ValidatorTest.php

27 lines
593 B
PHP

<?php
namespace pdt256\Shipping;
use PHPUnit\Framework\TestCase;
use stdClass;
class ValidatorTest extends 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');
$this->assertTrue(true);
}
}