MockUnitTest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. namespace lithium\tests\mocks\test;
  9. class MockUnitTest extends \lithium\test\Unit {
  10. public function testNothing() {
  11. $this->assertTrue(true);
  12. }
  13. /**
  14. * This method is used in a test and is *line sensitive*. The corresponding
  15. * test's expectations needs to be adapted if the line of the `assert()`
  16. * call changes.
  17. *
  18. * @see lithium\tests\cases\test\UnitTest::testAssertBacktraces()
  19. */
  20. public function testSomething() {
  21. $this->assert(true);
  22. }
  23. /**
  24. * This method is used in a test to prepare it.
  25. *
  26. * @see lithium\tests\cases\test\UnitTest::testExpectExceptionNotThrown()
  27. */
  28. public function prepareTestExpectExceptionNotThrown() {
  29. $this->expectException('test');
  30. }
  31. public function compare($type, $expected, $result = null, $trace = null) {
  32. return parent::_compare($type, $expected, $result, $trace);
  33. }
  34. public function handleException($exception, $lineFlag = null) {
  35. return parent::_handleException($exception, $lineFlag);
  36. }
  37. public function expected() {
  38. return $this->_expected;
  39. }
  40. }
  41. ?>