blob: a7fbded278de2110a09c8298d5113370de83d780 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Tests;
4
5trait MightNotMakeAssertions
6{
7 /**
8 * This is a shim to support PHPUnit for php 5.6 and 7.0.
9 *
10 * It has to be named something that doesn't collide with existing
11 * TestCase methods as we can't support PHP return types right now
12 *
13 * @return void
14 */
15 public function noAssertionsMade()
16 {
17 foreach (class_parents($this) as $parent) {
18 if (method_exists($parent, 'expectNotToPerformAssertions')) {
19 parent::expectNotToPerformAssertions();
20 return;
21 }
22 }
23
24 $this->assertTrue(true);
25 }
26}