[ '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:----c1BQqxuu1xs8I4w7jwvIhaptZBPn18dyj7iLq0wS8HCH/WsyiNMq16EQXJI75eNmsxXRA0P1gtO5C8YKbkopcxdIs0kdAM7/EugOlDDOWobkHwmDcMdS65S+8GqrIqcAARRS7H/+4sk9OVnPLcdXS0ypTmx6IkB2u/u+QuVidrJgol5oObwTgZCKkqaU+AwCdXu1gI9ezpAaDpL+B1c3UmWgiER75vawwzGezvuWUpJbeVEhmUL4WwtEcxwN+Pj0PtAry0Xffun9263P9mXogGsQIHAZXPGthrwGhx7bKC7oKczOp6zCRqnD0W8A6oK37HAh+5Dl29W+Fj/kchMdN3gN/zI6GsEdtpauRpzS9YKsM66fcZ/km4Ic8n5XTjJvqApe10av3eA6GN71msQeiqRhDIfMDm7vTtlt1yInV1Eh768+4Zksg7A4hZTdfVDE6KymRF8h82ISlyuAAB9G0H3ha1rpFYd8mNXuAlM42ZGyJXl51gXWnHoZ7Eo/rn6osMJBfnYXl7LDqxVKT7vUX6CJ870Hu7MS/ajI1BrxV8leKcGUnfRNMLvsmI8Cjvo25Y3D5srPquyXy085xd3P7qemMCuZ3F3KY4JtJSE5G/YgtIrqrv3Do3p14nd3hp11z2I/8AUYNOgRbz6pO/5x4vK6GUcnaJVb8/IL9Am+tRI=----ATTACHMENT:----OTE3Mjc0NTM4MDk0NjI2NSA1NDEwMDY3NjIyMTE1ODkgODYxNDYzMDA4MDkwOTM0Nw==