minor #29681 [Stopwatch] Fixed phpdoc for category name (samnela)
This PR was merged into the 3.4 branch.
Discussion
----------
[Stopwatch] Fixed phpdoc for category name
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
7f46dfb1c4
[Stopwatch] Fixed phpdoc for category name
This commit is contained in:
commit
3be0445596
@ -97,7 +97,7 @@ 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