mapper()->map( SimpleObject::class, new YamlSource('value: foo') ); } catch (MappingError $error) { $this->mappingFail($error); } self::assertSame('foo', $object->value); } }