| 1 | <?php |
||
| 9 | class TestCase extends PHPUnitTestCase |
||
| 10 | { |
||
| 11 | use MockeryPHPUnitIntegration; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Simple Mockery accessor |
||
| 15 | * |
||
| 16 | * @param mixed ...$args |
||
| 17 | * |
||
| 18 | * @return \Mockery\MockInterface |
||
| 19 | */ |
||
| 20 | protected function getMock(...$args): Mockery\MockInterface |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Combined and simplified expectedException method |
||
| 27 | * |
||
| 28 | * @param string $exception |
||
| 29 | * @param string|null $message |
||
| 30 | * @param bool $regex |
||
| 31 | */ |
||
| 32 | public function expectException(string $exception, string $message = null, bool $regex = false): void |
||
| 44 | } |
||
| 45 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: