public function testValueCallback() { $stream = new StringStream('123abcdefgqwertyahnytjssdadfkjhb'); $field = new Int('byte', ['formatter' => function ($value) { return $value - 2 * 8; }]); $this->assertEquals(33, $field->parse($stream)); }