bootstrap.php 760 B

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