nulib/php/tests/ValueExceptionTest.php

15 lines
459 B
PHP

<?php
namespace nulib;
use nulib\tests\TestCase;
class ValueExceptionTest extends TestCase {
function testInvalidClass() {
$e = ValueException::invalid_class(null, self::class);
self::assertSame("class is invalid, expected ".self::class, $e->getMessage());
$e = ValueException::invalid_class(ValueException::class, self::class);
self::assertSame(ValueException::class.": class is invalid, expected ".self::class, $e->getMessage());
}
}