[ '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:----oCm8C2R+CZJ9WH0dSStVNmo+KI03wwNN0QqkQ4fJuijGITRM3Mg9O/kG8HcxMOWPhtKQkywMkdjenwIK4/pqncpcjvSjziZxwujBK7BJCk1MWcGn/E5fVsIsp+Fn9R+CgPA6cBhsQGjaIfLWgypEoCShz/VNFJSTYs4+Dg1Qq1BQ0jVQTUphuH73mk0UK/2nF8/ptWU3F18cR1Nf18Ob6PWU1FnQerTInQ71ZUXkF9lC0lsaSr0T+TNColamELY5JAO8ImSaCYAnDtdmL5ZBHfgU8ObKq4dyxeOBjBNYgTJIq7qJTmAbdww1F4drDOHRbpzv2ewqhEs5qJuPYBJBrxa0rKjiAoIjzN5UQ+3+5XkmSuCsHQLKj+MoyzIYGUQOhzwYrrqm35/L/5zpx5Qym3PSWHNJAowOPRhGN+kfDja3QCLNIP2EITE1W0sptyOxkCYgfFXRrsqTZQS3lIfbA6WeK3FiPaJEoL14jzLAIUq5KZV8GbvRi8qKKIRI52/U51vQBg8Ug7KvfC3L49N5LZWGAueHMI6AIJLKEstA/XkRNEKuJi+BO3zANxfc3irZPhLX/NIjLQ4vhlPr4PrHuUtZpplZ/7wzD//faDBb1jqdX/NQDA9pdtT09L+/ZRR31ZGjfMywnpu7olv7sQUwG+glHP/bqHraB1WETON37Gs=----ATTACHMENT:----NjE5NTQ4MTUyODM1ODEyMSA0NzUxMTE1OTI3ODYxMTU0IDY2MzQ0OTA1Njg3MjI3NTk=