| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function testResolve() |
||
| 30 | { |
||
| 31 | $this |
||
| 32 | ->given($className = PostEventSourced::class) |
||
| 33 | ->and($postId = PostId::fromNative(md5(rand()))) |
||
| 34 | ->when($result = NameResolver::resolve($className, $postId)) |
||
| 35 | ->then() |
||
| 36 | ->string($result) |
||
| 37 | ->isEqualTo('PostEventSourced-'.$postId->toNative()) |
||
| 38 | ; |
||
| 39 | |||
| 40 | $this |
||
| 41 | ->given($className = 'FooDocument') |
||
| 42 | ->and($postId = PostId::fromNative(md5(rand()))) |
||
| 43 | ->when($result = NameResolver::resolve($className, $postId)) |
||
| 44 | ->then() |
||
| 45 | ->string($result) |
||
| 46 | ->isEqualTo('FooDocument-'.$postId->toNative()) |
||
| 47 | ; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |