public function testAppName()
 {
     $e = new Tinebase_Exception('test', 123);
     $this->assertEquals('Tinebase', $e->getAppName());
     $this->assertEquals(123, $e->getCode());
     $this->assertEquals('test', $e->getMessage());
 }
 /**
  * Tests the duplicate check
  */
 public function testDuplicateException()
 {
     $e = $this->_getEmployee();
     $e->contracts = array($this->_getContract()->toArray());
     $savedEmployee = $this->_json->saveEmployee($e->toArray());
     $exception = new Tinebase_Exception();
     try {
         $e = $this->_getEmployee();
         $e->contracts = array($this->_getContract()->toArray());
         $savedEmployee = $this->_json->saveEmployee($e->toArray());
     } catch (Tinebase_Exception_Duplicate $exception) {
     }
     $this->assertEquals($exception->getCode(), 629);
 }