OverrideTest.php 496 B

1234567891011121314151617181920212223242526
  1. <?php
  2. include __DIR__.'/../vendor/autoload.php';
  3. class OverrideTest extends \Codeception\PHPUnit\TestCase
  4. {
  5. protected function _setUp()
  6. {
  7. }
  8. protected function _tearDown()
  9. {
  10. \Codeception\Verify::$override = false;
  11. }
  12. public function testVerifyCanBeOverridden()
  13. {
  14. \Codeception\Verify::$override = MyVerify::class;
  15. $this->assertInstanceOf(MyVerify::class, verify(null));
  16. }
  17. }
  18. class MyVerify extends \Codeception\Verify {
  19. }