public function testUnsupportedItemType($item, $type) { $this->queue->push($item); if (Types::TYPE_OBJECT === $type && $item !== $this->queue->pop()) { throw new \Exception('Objects are not identical'); } }