mapper = new TreeMapperContainer( new FakeTypeParser(), new RootNodeBuilder(new FakeNodeBuilder()), ); } public function test_invalid_mapping_type_signature_throws_exception(): void { $this->expectException(InvalidMappingTypeSignature::class); $this->expectExceptionCode(1630959692); $this->expectExceptionMessageMatches('/^Could not parse the type `foo` that should be mapped: .*/'); $this->mapper->map('foo', []); // @phpstan-ignore-line } public function test_invalid_mapping_type_throws_exception(): void { $this->expectException(InvalidMappingType::class); $this->expectExceptionCode(1630959731); $this->expectExceptionMessage("Can not map type `string`, it must be an object type."); $this->mapper->map('string', []); // @phpstan-ignore-line } }