<?php
/* SOME TESTS ARE MEANT TO FAIL!
If the entire script runs, it works. */
require_once( '../../../Data/Types/Null.php' );
use Falcraft\Data\Types;
echo "Falcraft\\Data\\Types\\Null.php Test\n";
echo "---------------------------------\n\n";
echo "Instantiation -> ";
$success = true;
$testNull = null;
try {
$testNull = new Types\Null();
} catch (\Exception $e) {
$success = false;
}
if ($success) {
echo "Success!\n";
} else {
echo "Failure...\n";
}
echo "InstanceOf -> ";
if ($testNull instanceof Types\Null) {
echo "Works\n";
}
echo "Constant -> ";
if (Types\Null::NULL === null) {
echo "Works\n";
}
echo "Member->Property -> ";
if ($testNull->null === null) {
echo "Works\n";
}
echo "Member->Method() -> ";
if ($testNull->null() === null) {
echo "Works\n";
}
|