Наследование: extends Bravo3\Orm\Enum\OrmEnum
Пример #1
0
 public function __construct()
 {
     $this->enum = Enum::ALPHA();
 }
Пример #2
0
 /**
  * @dataProvider entityManagerDataProvider
  * @param EntityManager $em
  */
 public function testSerialisation(EntityManager $em)
 {
     $product = new Product();
     $product->setId(700)->setEnum(Enum::BRAVO())->setList(['a', 'b', 'c']);
     $em->persist($product)->flush();
     /** @var Product $r_product */
     $r_product = $em->retrieve(Product::class, '700');
     $this->assertEquals(Enum::BRAVO(), $r_product->getEnum());
     $this->assertCount(3, $r_product->getList());
     $this->assertEquals('a', $r_product->getList()[0]);
     $this->assertEquals('c', $r_product->getList()[2]);
 }