|
18 | 18 | }); |
19 | 19 |
|
20 | 20 | it('tracks entering a controlled block', function () { |
21 | | - $this->context->enter('test-block', 'ulid-123'); |
| 21 | + $this->context->enter('test-block', 'uuid-123'); |
22 | 22 |
|
23 | 23 | expect($this->context->isInside())->toBeTrue() |
24 | 24 | ->and($this->context->current())->toBe([ |
25 | 25 | 'name' => 'test-block', |
26 | | - 'ulid' => 'ulid-123', |
| 26 | + 'uuid' => 'uuid-123', |
27 | 27 | ]); |
28 | 28 | }); |
29 | 29 |
|
30 | 30 | it('clears context when exiting', function () { |
31 | | - $this->context->enter('test-block', 'ulid-123'); |
| 31 | + $this->context->enter('test-block', 'uuid-123'); |
32 | 32 | $this->context->exit(); |
33 | 33 |
|
34 | 34 | expect($this->context->isInside())->toBeFalse() |
35 | 35 | ->and($this->context->current())->toBeNull(); |
36 | 36 | }); |
37 | 37 |
|
38 | 38 | it('prevents nested controlled blocks', function () { |
39 | | - $this->context->enter('outer-block', 'ulid-outer'); |
| 39 | + $this->context->enter('outer-block', 'uuid-outer'); |
40 | 40 |
|
41 | | - expect(fn () => $this->context->enter('inner-block', 'ulid-inner')) |
| 41 | + expect(fn () => $this->context->enter('inner-block', 'uuid-inner')) |
42 | 42 | ->toThrow( |
43 | 43 | NestedControlledBlockException::class, |
44 | | - "Nested Controlled block detected: attempted to start 'inner-block' while already in 'outer-block' (ULID: ulid-outer)." |
| 44 | + "Nested Controlled block detected: attempted to start 'inner-block' while already in 'outer-block' (uuid: uuid-outer)." |
45 | 45 | ); |
46 | 46 | }); |
47 | 47 |
|
48 | 48 | it('allows sequential blocks after exit', function () { |
49 | | - $this->context->enter('first-block', 'ulid-first'); |
| 49 | + $this->context->enter('first-block', 'uuid-first'); |
50 | 50 | $this->context->exit(); |
51 | 51 |
|
52 | 52 | // Should not throw |
53 | | - $this->context->enter('second-block', 'ulid-second'); |
| 53 | + $this->context->enter('second-block', 'uuid-second'); |
54 | 54 |
|
55 | 55 | expect($this->context->current())->toBe([ |
56 | 56 | 'name' => 'second-block', |
57 | | - 'ulid' => 'ulid-second', |
| 57 | + 'uuid' => 'uuid-second', |
58 | 58 | ]); |
59 | 59 | }); |
60 | 60 |
|
61 | 61 | it('handles multiple exit calls gracefully', function () { |
62 | | - $this->context->enter('test-block', 'ulid-123'); |
| 62 | + $this->context->enter('test-block', 'uuid-123'); |
63 | 63 | $this->context->exit(); |
64 | 64 | $this->context->exit(); // Should not cause errors |
65 | 65 |
|
|
0 commit comments