public function testAppName() { $e = new Tinebase_Exception('test', 123); $this->assertEquals('Tinebase', $e->getAppName()); $this->assertEquals(123, $e->getCode()); $this->assertEquals('test', $e->getMessage()); }
/** * test creating a folder in a folder with the same name (below personal folders) * * @see: https://forge.tine20.org/mantisbt/view.php?id=10132 */ public function testCreateFolderInFolderWithSameName() { $path = '/personal/' . Tinebase_Core::getUser()->accountLoginName . '/' . $this->_getPersonalFilemanagerContainer()->name; $this->_json->createNode($path . '/Test1', 'folder', NULL, FALSE); $this->_json->createNode($path . '/Test1/Test1', 'folder', NULL, FALSE); $e = new Tinebase_Exception('nothing'); try { $this->_json->createNode($path . '/Test1/Test1/Test2', 'folder', NULL, FALSE); } catch (Exception $e) { $this->fail('The folder couldn\'t be found, so it hasn\'t ben created'); } $this->assertEquals('nothing', $e->getMessage()); }