bootstrap.php 712 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. require_once __DIR__.'/../lib/base.php';
  3. if(!class_exists('PHPUnit_Framework_TestCase')) {
  4. require_once('PHPUnit/Autoload.php');
  5. }
  6. //SimpleTest compatibility
  7. abstract class UnitTestCase extends PHPUnit_Framework_TestCase{
  8. function assertEqual($expected, $actual, $string='') {
  9. $this->assertEquals($expected, $actual, $string);
  10. }
  11. function assertNotEqual($expected, $actual, $string='') {
  12. $this->assertNotEquals($expected, $actual, $string);
  13. }
  14. static function assertTrue($actual, $string='') {
  15. parent::assertTrue((bool)$actual, $string);
  16. }
  17. static function assertFalse($actual, $string='') {
  18. parent::assertFalse((bool)$actual, $string);
  19. }
  20. }
  21. OC_Hook::clear();
  22. OC_Log::$enabled = false;