public function testRemoveEntity() { $entityFoo = $this->createBindEntity('Foo'); $entityBar = $this->createBindEntity('Bar'); $entityBaz = $this->createBindEntity('Baz'); $this->workflowItem->addBindEntity($entityFoo); $this->workflowItem->addBindEntity($entityBar); $this->workflowItem->addBindEntity($entityBaz); $this->workflowItem->removeBindEntity($entityBar); $this->assertEquals(2, $this->workflowItem->getBindEntities()->count()); $this->assertEquals($entityFoo, $this->workflowItem->getBindEntities()->get(0)); $this->assertEquals($entityBaz, $this->workflowItem->getBindEntities()->get(2)); $this->workflowItem->removeBindEntity($entityFoo); $this->assertEquals(1, $this->workflowItem->getBindEntities()->count()); $this->assertEquals($entityBaz, $this->workflowItem->getBindEntities()->get(2)); $this->workflowItem->removeBindEntity($entityBaz); $this->assertTrue($this->workflowItem->getBindEntities()->isEmpty()); }