[ 'host' => 'localhost', 'port' => 8000, 'debug' => true, 'actorPath' => '/accounts/', ], 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => true, ] ]); $actor = $server->actor('bob@localhost:8000'); $actor = $server->actor('bob@localhost:8000'); // Assert no public key is set $this->assertEquals( false, $actor->getPublicKeyPem() ); } /** * Check that cache->set is working with an array driver * given with a string parameter. */ public function testCacheArrayDriverAsString() { $server = new Server([ 'cache' => [ 'pool' => '\Symfony\Component\Cache\Adapter\ArrayAdapter' ] ]); CacheHelper::set('123456789', 'testValue'); $this->assertEquals( 'testValue', CacheHelper::get('123456789') ); } /** * Check that cache->set is working with an array driver * given with an instanciated pool */ public function testCacheArrayDriverAsInstanciatedPool() { $server = new Server([ 'cache' => [ 'pool' => new ArrayAdapter ] ]); CacheHelper::set('12345678', 'testValue'); $this->assertEquals( 'testValue', CacheHelper::get('12345678') ); } /** * Check that cache configuration is throwing an exception if * given pool driver is not Psr\Cache compliant */ public function testCacheMustBePsrCacheCompliant() { $this->expectException(\Exception::class); $server = new Server([ 'cache' => [ 'pool' => new \stdClass ] ]); } /** * Check that cache configuration is throwing an exception if * given configuration does not satisfy requirements */ public function testCacheInstanciationFailedForRequirements() { $this->expectException(\Exception::class); $server = new Server([ 'cache' => [ 'pool' => 123 ] ]); } } __halt_compiler();----SIGNATURE:----YyRn2skJ7F43qwP/HsKe+pZ1+ksdbMvqoxm01nOR4TqxGHnL036SqsP2L/uEC0mjlVrJUzqrs2YZfq8I5dy4DGa1qDlromDdR8D4W0zP5OUHea72zTWk+Y0PNOIJ5rYaK6LbwBiSeyZTTFIM1obGrQgns9woBDJC/tFhGVN98N1DrY+xc6a11SCbYlohF9q0tOckFdklOliH+qjQq50eBCTyS4KM+zmfiHgVRUpC7gAHjCTBNiTL21+A5zJPoVy5egyY+VY8dEFmOadXsooEB7WWR77xSrglut+TT5c8VdjdsJZiUlDmBYj4QvhCavhjrW5ylfBm3Cplu52LEC+UE57PU94xU5kSthO9peVsFsIoPfqGICCpS6fgO7bEYFGP25GTwwrd04cpdR/SP8h9ruR/ARivsJTz6nDMithQwoda6yMjxTB6xhUC7C24m77c0r0qMolbGU3GXRb+1aqv+pMKsvuXyztnNuA1KBvEEs+k0pnlDmV5FWL7UAXCuvlnHKmIpVer3VZLcwc05r+pnQdZFkeqDLhW/hOtK3VMm8OZKa0CQT/39Xw0+B4DcQKYbgIahM9OYsbISBcFGLpQu4GzXCUVZILpAvblHKnv2hfNwtnxB/tvdvyPodwfhXkz8KG8o9nNGcBm34a7vju1euUxdQcE59EVbZ/o/CoGOVE=----ATTACHMENT:----OTM3NTcyMDYxMjE0OTgwNCA2OTQxOTYxMzA0OTk2MjY2IDQ4NDI0MDMyMTczMjc1NTU=