[ '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:----JkZHg8oJpFnh1S7qndQWHfhg37kJeMNRMkA+UH2g14RFF9csZcqzR/umIZxkFTSzpifVLDIMttC3B9D0tWlL5DRN90USazS6pwycwZh+Jl0ttsUShzxl12kHJ/GfNzoLxBS9HUfGeD+b8f3eMBupIkqUD/WPqoX3f2xSsuQWJnuuDb1cWuE3lV+/ClLhhTMVTPQGzN5BMXR8BbnPmdwVcj42AVOwgUTiEg3ipahMFJCIg9OpFRwMgnBfLkS5xOkcRE7h81bAvXZBrRyeEoxcqsUbsKzJqC3ohQ6Seez0U8Yrd8Wgs1aqnNnAZsXtAg1aFKuixy1VZ0u2deA+MXS7XysU6KJ25wYChNUCpxWIcmXUkf4leFOGcnYW9deUWwNLtNd+KRqzfRMEkEc2WzvRAb0shj/VxIuRasUxshjFJVetlpP771wOcimAR+vT/iM+j3/jSmG5VTB1QklKeUzjPGRzpDALtyVvE1kW8rjRX24C8khQ71/KyJeH6t3CJZRwFr00kh/dkVnbYE1x+QIk6U9ZpBeySl9sQLCdwmkXIeF29T6I0yI+mGCa86coYW3VfgkxP2uC8dULwG6ykbFH5R9iEPLmHGOYBs0W2yZhGjGehhkwcSRjuAStAiagT6aqfdUhLmNBnLZUgNLUa93sqA30IUt9LLLYCT/6+6CWy/s=----ATTACHMENT:----NTU1NTIxOTI1MTA4MDkyNiA2NzExMjY3NjkxNzMxMDk3IDc3NjQxMDI1MDU2ODYzNg==