public function testGetId() { $this->assertNull($this->entity->getId()); $value = 42; $idReflection = new \ReflectionProperty(get_class($this->entity), 'id'); $idReflection->setAccessible(true); $idReflection->setValue($this->entity, $value); $this->assertEquals($value, $this->entity->getId()); }