Files
TwoFactorAuth/tests/MightNotMakeAssertions.php
T
2021-02-03 09:31:07 +00:00

24 lines
590 B
PHP

<?php
namespace Tests;
trait MightNotMakeAssertions
{
/**
* This is a shim to support PHPUnit for php 5.6 and 7.0.
*
* It has to be named something that doesn't collide with existing
* TestCase methods as we can't support PHP return types right now
*/
public function noAssertionsMade()
{
foreach (class_parents($this) as $parent) {
if (method_exists($parent, 'expectNotToPerformAssertions')) {
return parent::expectNotToPerformAssertions();
}
}
return $this->assertTrue(true);
}
}