public function testGetId() { $this->assertNull($this->entity->getId()); $testValue = 1; $reflectionProperty = new \ReflectionProperty('\\Oro\\Bundle\\WorkflowBundle\\Entity\\ProcessTrigger', 'id'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->entity, $testValue); $this->assertEquals($testValue, $this->entity->getId()); }
/** * @param ProcessTrigger $processTrigger * @return Process */ protected function getProcess(ProcessTrigger $processTrigger) { if (!array_key_exists($processTrigger->getId(), $this->processes)) { $this->processes[$processTrigger->getId()] = $this->factory->create($processTrigger->getDefinition()); } return $this->processes[$processTrigger->getId()]; }