/** * @expectedException Fliglio\Web\ValidationException */ public function testCompositeArrayValidationError() { // given $expectedBar = new Bar("foo", new Foo("foo"), array(new Foo("foo"), new Foo("invalid"))); // when $expectedBar->validate(); }
public function testStaticApiMapperWithoutNamingConvention() { // given $entity = new Bar("bar", new Foo("foo"), [new Foo("baz"), new Foo("biz")]); // when $vo = $entity->marshal(); $foundEntity = Bar::unmarshal($vo); // then $this->assertEquals($entity, $foundEntity); }