|
@@ -106,13 +106,13 @@ discard block |
|
|
block discarded – undo |
|
106
|
106
|
$span = (new Tracer())->getActiveSpan(); |
|
107
|
107
|
|
|
108
|
108
|
// set attributes |
|
109
|
|
- $span->setAttributes([ 'username' => 'nekufa' ]); |
|
|
109
|
+ $span->setAttributes(['username' => 'nekufa']); |
|
110
|
110
|
|
|
111
|
111
|
// get attribute |
|
112
|
112
|
$this->assertSame($span->getAttribute('username'), 'nekufa'); |
|
113
|
113
|
|
|
114
|
114
|
// otherwrite |
|
115
|
|
- $span->setAttributes([ 'email' => '[email protected]', ]); |
|
|
115
|
+ $span->setAttributes(['email' => '[email protected]', ]); |
|
116
|
116
|
|
|
117
|
117
|
// null attributes |
|
118
|
118
|
$this->assertNull($span->getAttribute('username')); |
|
@@ -127,9 +127,9 @@ discard block |
|
|
block discarded – undo |
|
127
|
127
|
]); |
|
128
|
128
|
|
|
129
|
129
|
// keep order |
|
130
|
|
- $span->setAttributes([ 'a' => 1, 'b' => 2]); |
|
|
130
|
+ $span->setAttributes(['a' => 1, 'b' => 2]); |
|
131
|
131
|
$this->assertSame(array_keys($span->getAttributes()), ['a', 'b']); |
|
132
|
|
- $span->setAttributes([ 'b' => 2, 'a' => 1, ]); |
|
|
132
|
+ $span->setAttributes(['b' => 2, 'a' => 1, ]); |
|
133
|
133
|
$this->assertSame(array_keys($span->getAttributes()), ['b', 'a']); |
|
134
|
134
|
|
|
135
|
135
|
// attribute update don't change the order |
Please login to merge, or discard this patch.