-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add more tests * Fix test * Cover BacktraceIgnoreMatcher * Cover VarDumperCollector * Cover ExceptionCollector * Cover HttpClientCollector * Cover HttpClientCollectorProxy * Apply fixes from StyleCI * Fix test * Cover more cases * Cover more cases * Apply fixes from StyleCI * Apply Rector changes (CI) * Add checks * Cover line * Try fix * fix ci * rollback * fix * fix * Cover more lines * Enhance command test * Apply fixes from StyleCI * Apply Rector changes (CI) --------- Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: xepozz <[email protected]> Co-authored-by: Sergei Predvoditelev <[email protected]>
- Loading branch information
1 parent
71ac2a8
commit 8d79cc4
Showing
28 changed files
with
738 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
return [ | ||
'/'=>[ | ||
'params' => [ | ||
|
||
] | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'/' => [ | ||
'params' => [ | ||
'yiitest/yii-debug' => [ | ||
'param1.php', | ||
], | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Yii\Debug\Tests\Support\Stub; | ||
|
||
class ThreeProperties | ||
{ | ||
public $first = 'first'; | ||
protected $second = 'second'; | ||
private string $third = 'third'; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
tests/Unit/Collector/EventDispatcherInterfaceProxyTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yiisoft\Yii\Debug\Tests\Unit\Collector; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Psr\EventDispatcher\EventDispatcherInterface; | ||
use stdClass; | ||
use Yiisoft\Yii\Debug\Collector\EventCollector; | ||
use Yiisoft\Yii\Debug\Collector\EventDispatcherInterfaceProxy; | ||
use Yiisoft\Yii\Debug\Collector\TimelineCollector; | ||
|
||
final class EventDispatcherInterfaceProxyTest extends TestCase | ||
{ | ||
public function testDispatch() | ||
{ | ||
$event = new stdClass(); | ||
$collector = new EventCollector(new TimelineCollector()); | ||
$collector->startup(); | ||
|
||
$eventDispatcherMock = $this->createMock(EventDispatcherInterface::class); | ||
$eventDispatcherMock | ||
->expects($this->once()) | ||
->method('dispatch') | ||
->with($event) | ||
->willReturn($event); | ||
$eventDispatcher = new EventDispatcherInterfaceProxy($eventDispatcherMock, $collector); | ||
|
||
$newEvent = $eventDispatcher->dispatch($event); | ||
|
||
$this->assertSame($event, $newEvent); | ||
$this->assertCount(1, $collector->getCollected()); | ||
} | ||
} |
Oops, something went wrong.