1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Yiisoft\Yii\Debug\Tests\Unit\Event; |
||
6 | |||
7 | use PHPUnit\Framework\TestCase; |
||
8 | use stdClass; |
||
9 | use Yiisoft\Yii\Debug\Event\ProxyMethodCallEvent; |
||
10 | |||
11 | class ProxyMethodCallEventTest extends TestCase |
||
12 | { |
||
13 | public function testEvent(): void |
||
14 | { |
||
15 | $time = microtime(true); |
||
16 | $event = new ProxyMethodCallEvent( |
||
17 | 'test', |
||
18 | stdClass::class, |
||
19 | 'test', |
||
20 | [], |
||
21 | true, |
||
22 | 'success', |
||
23 | null, |
||
24 | $time, |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
25 | $time + 1 |
||
26 | ); |
||
27 | |||
28 | $this->assertEquals($time, $event->timeStart); |
||
29 | $this->assertEquals($time + 1, $event->timeEnd); |
||
30 | $this->assertEquals(stdClass::class, $event->class); |
||
31 | } |
||
32 | } |
||
33 |