value = '1010100101'; $this->emptyValue = ''; $this->format = BarcodeFormat::EAN13; }); it('creates a valid gs1', function (): void { // WHEN $GS1 = new GS1( $this->value, $this->format ); // THEN expect($GS1->value)->toBe($this->value) ->and($GS1->format)->toBe($this->format); }); it('rejects invalid gs1', function (): void { // GIVEN / WHEN / THEN expect(fn (): GS1 => new GS1( $this->emptyValue, $this->format ))->toThrow(\DomainException::class); }); });