﻿class TestCase
{
    public function assertFail($msg = NULL) {
        if($msg == NULL) 
            $msg = "Fail";
        throw new Exception($msg);
    }
    public function assertTrue($b, $msg = NULL) {
        if($msg == NULL) 
            $msg = "Must be true";
        if(!$b) 
            throw new Exception($msg);
    }
    public function assertFalse($b, $msg = NULL) {
        if($msg == NULL)
            $msg = "Must be false";
        if($b)
            throw new Exception($msg);
    }
    public function assertNull($b, $msg = NULL) {
        if($msg == NULL)
            $msg = "Must be null";
            if($b != NULL)
                throw new Exception($msg);
    }
    public function assertNotNull($b, $msg = NULL) {
        if($msg == NULL)
            $msg = "Must be not null";
        if($b != NULL)
            throw new Exception($msg);
    }
    public function assertEquals($a, $b, $msg = NULL) {
        if($msg == NULL)
            $msg = "Must be equals";
        if($a != $b)
            throw new Exception($msg);
    }
    public function assertSame($a, $b, $msg = NULL) {
        if($msg == NULL)
            $msg = "Must be same";
        if($a != $b)
            throw new Exception($msg);
    }
}    
