PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/app/protected/modules/import/tests/unit/ImportBaseTest.php

https://bitbucket.org/ddonthula/zurmoreports
PHP | 48 lines | 22 code | 2 blank | 24 comment | 1 complexity | 05a119830b9ac6e1eb01978597b6fd2e MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, GPL-2.0, GPL-3.0, BSD-3-Clause, LGPL-3.0
  1. <?php
  2. /*********************************************************************************
  3. * Zurmo is a customer relationship management program developed by
  4. * Zurmo, Inc. Copyright (C) 2012 Zurmo Inc.
  5. *
  6. * Zurmo is free software; you can redistribute it and/or modify it under
  7. * the terms of the GNU General Public License version 3 as published by the
  8. * Free Software Foundation with the addition of the following permission added
  9. * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  10. * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
  11. * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  12. *
  13. * Zurmo is distributed in the hope that it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU General Public License along with
  19. * this program; if not, see http://www.gnu.org/licenses or write to the Free
  20. * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  21. * 02110-1301 USA.
  22. *
  23. * You can contact Zurmo, Inc. with a mailing address at 113 McHenry Road Suite 207,
  24. * Buffalo Grove, IL 60089, USA. or at email address contact@zurmo.com.
  25. ********************************************************************************/
  26. class ImportBaseTest extends ZurmoBaseTest
  27. {
  28. public static function tearDownAfterClass()
  29. {
  30. R::exec('drop table if exists testimporttable');
  31. R::exec('drop table if exists testimporttable2');
  32. R::exec('drop table if exists testimporttable3');
  33. R::exec('drop table if exists testimporttable4');
  34. parent::tearDownAfterClass();
  35. }
  36. protected static function getStringByLength($length)
  37. {
  38. $string = chr(rand(ord('A'), ord('Z')));
  39. while (strlen($string) < $length)
  40. {
  41. $string .= chr(rand(ord('a'), ord('z')));
  42. }
  43. return $string;
  44. }
  45. }
  46. ?>