Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3// ╔════════════════════════════════════════════════════════════╗
4// ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║
5// ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com>     ║
6// ╚════════════════════════════════════════════════════════════╝
7
8declare(strict_types=1);
9
10use AppDemo\Loan\Domain\Exception\BookNotAvailableException;
11use Phexium\Domain\Id\TimestampId;
12
13it('throws exception with book ID in message', function (): void {
14    expect(fn () => throw BookNotAvailableException::forBook(
15        TimestampId::from(123)
16    ))
17        ->toThrow(BookNotAvailableException::class, 'ID 123')
18    ;
19});