2023-12-27 11:38:57 +04:00
|
|
|
<?php
|
|
|
|
namespace nulib;
|
|
|
|
|
|
|
|
use nulib\tests\TestCase;
|
|
|
|
|
|
|
|
class ValueExceptionTest extends TestCase {
|
2023-12-28 12:33:06 +04:00
|
|
|
function testInvalidClass() {
|
|
|
|
$e = ValueException::invalid_class(null, self::class);
|
2023-12-27 11:38:57 +04:00
|
|
|
self::assertSame("class is invalid, expected ".self::class, $e->getMessage());
|
|
|
|
|
2023-12-28 12:33:06 +04:00
|
|
|
$e = ValueException::invalid_class(ValueException::class, self::class);
|
2023-12-27 11:38:57 +04:00
|
|
|
self::assertSame(ValueException::class.": class is invalid, expected ".self::class, $e->getMessage());
|
|
|
|
}
|
|
|
|
}
|