1--TEST-- 2SolrCollapseFunction - Illegal Operations 3--SKIPIF-- 4<?php if (version_compare(PHP_VERSION, "5.4", "lt")) die("skip PHP 5.4+ only"); ?> 5--FILE-- 6<?php 7 8$func = new SolrCollapseFunction('field'); 9 10try { 11 $tmp = clone $func; 12} catch (SolrIllegalOperationException $e) { 13 echo PHP_EOL . sprintf('Code %d: %s', $e->getCode(), $e->getMessage()).PHP_EOL; 14} 15 16$func->setMax('max'); 17 18try { 19 // known issue, object corruption 20 $tmp = serialize($func); 21} catch (SolrIllegalOperationException $e) { 22 echo PHP_EOL . sprintf('Code %d: %s', $e->getCode(), $e->getMessage()).PHP_EOL; 23} 24 25?> 26--EXPECTF-- 27Code 4001: Cloning of SolrCollapseFunction objects is currently not supported 28 29Code 1001: Serialization of SolrCollapseFunction objects is currently not supported 30 31