Skip to content

Commit

Permalink
[Stopwatch] Fixed phpdoc for category name
Browse files Browse the repository at this point in the history
  • Loading branch information
samnela committed Dec 25, 2018
1 parent 44e9a91 commit 7f46dfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Stopwatch/Stopwatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function stopSection($id)
/**
* Starts an event.
*
* @param string $name The event name
* @param string $category The event category
* @param string $name The event name
* @param string|null $category The event category
*
* @return StopwatchEvent
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public function testStart()
$this->assertSame($event, $stopwatch->getEvent('foo'));
}

public function testStartWithoutCategory()
{
$stopwatch = new Stopwatch();
$stopwatchEvent = $stopwatch->start('bar');
$this->assertSame('default', $stopwatchEvent->getCategory());
$this->assertSame($stopwatchEvent, $stopwatch->getEvent('bar'));
}

public function testIsStarted()
{
$stopwatch = new Stopwatch();
Expand Down

0 comments on commit 7f46dfb

Please sign in to comment.