/** * @expectedException Fliglio\Http\Exceptions\UnprocessableEntityException */ public function testBindValidationError() { // given $expected = new Foo("bar"); $fooJson = '{"myProp": "bar"}'; $body = new Body($fooJson, 'application/json'); $mapper = new FooApiMapper(); // when $found = $body->bind($mapper); }
public function addFoo(Body $body) { return $body->get(); }