|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace SameOverEqualsTest; |
| 6 | + |
| 7 | +use Exception; |
| 8 | +use PHPUnit\Framework\TestCase; |
| 9 | + |
| 10 | +final class AssertSameOverAssertEqualsRule extends TestCase |
| 11 | +{ |
| 12 | + public function dummyTest(string $string, int $integer, bool $boolean, float $float, ?string $nullableString): void |
| 13 | + { |
| 14 | + $null = null; |
| 15 | + |
| 16 | + $this->assertSame(5, $integer); |
| 17 | + static::assertSame(5, $integer); |
| 18 | + |
| 19 | + $this->assertEquals('', $string); |
| 20 | + $this->assertEquals(null, $string); |
| 21 | + static::assertEquals(null, $string); |
| 22 | + static::assertEquals($nullableString, $string); |
| 23 | + $this->assertEquals(2, $integer); |
| 24 | + $this->assertEquals(2.2, $float); |
| 25 | + static::assertEquals((int) '2', (int) $string); |
| 26 | + $this->assertEquals(true, $boolean); |
| 27 | + $this->assertEquals($string, $string); |
| 28 | + $this->assertEquals($integer, $integer); |
| 29 | + $this->assertEquals($boolean, $boolean); |
| 30 | + $this->assertEquals($float, $float); |
| 31 | + $this->assertEquals($null, $null); |
| 32 | + $this->assertEquals((string) new Exception(), (string) new Exception()); |
| 33 | + $this->assertEquals([], []); |
| 34 | + $this->assertEquals(new Exception(), new Exception()); |
| 35 | + static::assertEquals(new Exception(), new Exception()); |
| 36 | + } |
| 37 | +} |
0 commit comments