[Stopwatch] Fixed phpdoc for category name
This commit is contained in:
parent
44e9a91f30
commit
7f46dfb1c4
@ -97,7 +97,7 @@ class Stopwatch
|
||||
* Starts an event.
|
||||
*
|
||||
* @param string $name The event name
|
||||
* @param string $category The event category
|
||||
* @param string|null $category The event category
|
||||
*
|
||||
* @return StopwatchEvent
|
||||
*/
|
||||
|
@ -35,6 +35,14 @@ class StopwatchTest extends TestCase
|
||||
$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();
|
||||
|
Reference in New Issue
Block a user