Skip to content

Commit dea9671

Browse files
committed
Fix: Update test to handle non-serializable objects in cache
1 parent 28bb960 commit dea9671

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/phpunit/tests/cache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ public function test_stats_with_non_serializable_simplexml_data() {
530530
// Directly inject the SimpleXMLElement into the cache storage to bypass
531531
// any object-clone logic in set(), simulating a real-world scenario where
532532
// a non-serializable object ends up in the cache.
533-
$cache_property = new ReflectionProperty( $this->cache, 'cache' );
533+
$cache_property = new ReflectionProperty( $this->cache, 'cache' );
534+
$cache_property->setAccessible( true );
534535
$cache_data = $cache_property->getValue( $this->cache );
535536
$cache_data['xml-group']['item1'] = $xml_object;
536537
$cache_property->setValue( $this->cache, $cache_data );

0 commit comments

Comments
 (0)