/** * Collect inserted owners activity entities * * @param array $entities */ protected function collectInsertedOwnerEntities(array $entities) { foreach ($entities as $hash => $entity) { if ($this->activityListManager->isSupportedOwnerEntity($entity) && empty($this->insertedOwnerEntities[$hash])) { $this->insertedOwnerEntities[$hash] = $entity; } } }
public function testIsSupportedOwnerEntity() { $testEntity = new \stdClass(); $this->chainProvider->expects($this->once())->method('isSupportedOwnerEntity')->with($testEntity)->willReturn(true); $this->assertTrue($this->manager->isSupportedOwnerEntity($testEntity)); }