[Stopwatch] Fixed phpdoc for category name
This commit is contained in:
parent
44e9a91f30
commit
7f46dfb1c4
@ -96,8 +96,8 @@ class Stopwatch
|
|||||||
/**
|
/**
|
||||||
* Starts an event.
|
* Starts an event.
|
||||||
*
|
*
|
||||||
* @param string $name The event name
|
* @param string $name The event name
|
||||||
* @param string $category The event category
|
* @param string|null $category The event category
|
||||||
*
|
*
|
||||||
* @return StopwatchEvent
|
* @return StopwatchEvent
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +35,14 @@ class StopwatchTest extends TestCase
|
|||||||
$this->assertSame($event, $stopwatch->getEvent('foo'));
|
$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()
|
public function testIsStarted()
|
||||||
{
|
{
|
||||||
$stopwatch = new Stopwatch();
|
$stopwatch = new Stopwatch();
|
||||||
|
Reference in New Issue
Block a user