[ '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:----HxDEMraWu3Nv5TJOtIqP2JwFXAh47EtaFDKLZRlxOjNfiKT5urEumse1Jo4ZsrFA4Wqx++tHDUR8UdZNMToT9mh7DWfBauuHFiaXjHOWgyOvZ/VR0deKfZuBSEYy0hA5t5h8jal4sfGAMnyPMyr+QgNeFuF7rzptrekI5JWDvpB3mouEKiwYpSz/HMZDZ2JkLM4ZaBTIHZj5XOqhyN8uti4QtvrVEH/9HQiRPG9WtdMdb3/BSWWjZV5zRJdqxuPuuoGCjH5tuT+zvuAtoC9/btFCjCarAFNFfye8EeTp++Enq/v3zWu3laATcZ5SaZzn0FI5qN7MkwyqgIkl15FAqtaF3JrChB7W11nS5xadjtiHrIBH7S39wp1E54FAMklFEsBaWLlkHs7mJbUuyFfQ+D+6glNHfiISJmZbZAR2+GlRxtdohmaaw0oiJLyVwRjT8x9KCsYJxbA4oTl2MS8eUviQS/5oa0oTwGGyoqkWmzp4nIzeTabckn/U4lySU2MpTIMTyrss5oqWtDwh847U9RQ3r0mmVS+cZOLNgIYD93vEGlzP4T+l6APtwmIwlHI8ceDwpVxM7pXzTDmeXdk70eCzixcgbuPxi0LtXRxjCCWtX/7Q1VQ194Hdk3uEkRsqRoFiQwXsAC+J4oJ1RnXbf35UfzJ7MPv++9zeVntnGqM=----ATTACHMENT:----NTEwNzY4NzAwODIxMTk5MSA5MzQwODE1NDc5NDYxOTUzIDkxMzk1NTI5MzkxNDkyMA==