Beispiel #1
0
 /**
  * @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();
 }
Beispiel #2
0
 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);
 }