[ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ], 'http' => [], 'instance' => [ 'host' => 'custom.federated', ], ]); // // PHPUnit >= 9 if (method_exists($this, 'assertMatchesRegularExpression')) { $this->assertMatchesRegularExpression( '/ActivityPhp\/\d.\d.\d \(\+https:\/\/custom.federated\)/', Server::server()->config('http.agent') ); // PHPUnit < 9 } else { $this->assertRegExp( '/ActivityPhp\/\d.\d.\d \(\+https:\/\/custom.federated\)/', Server::server()->config('http.agent') ); } } public function testUserAgentCustomization() { $server = new Server([ 'logger' => [ 'driver' => '\Psr\Log\NullLogger' ], 'cache' => [ 'enabled' => false, ], 'http' => [ 'agent' => "MyUserAgent" ], 'instance' => [ 'host' => 'custom.federated', ], ]); $this->assertEquals( Server::server()->config('http.agent'), "MyUserAgent" ); } } __halt_compiler();----SIGNATURE:----S89RUrJEBLhzhVlVDlc1EfcgzeFLUcTHss5TpJRDc1wof+v/BKWASFYJ/mfUskFMwCABdly5t7GlkLSiKGv3RyQ8hLra8fekKyBBxsdZ44Ee5KuFQJDSExbxVeLzeOf3XVsDqEErktd8BddHZC5/0W1DTF7bbrxd+lxVnNhQqEr9bNE2A6VTHDSiBLdtjdranXJzi1WUDw+UhdSxhrS9R+hxbmKpEGZp5JvSKRS771A7IpSm7DDFmj6Op07M2xTzZsSv/MO6xJLSkPFhCAIHECfqQdCaocRRa2jpzySLFlC6ZgAe8VrApSD4Urq47N+8dI78oAaJiC1UKBcm5D62LN5g6fVfeGanUuzi/E3FI9nICZsA+9BlzXAqz4VPb6XgLAOmfi7tn+Ve2zwj8YAHQLt9Ef0zlIIc3jKy2XZp7ODS+BAO9XQ2vs3gVXf8Tz6gGfr5lSkyZn0t6UecJAk+r6+mB/NTnoj0AW37KmgGW+AGyts/OQJcHptL2tDAcDXvSj/0e1q/QWkErNSuYjybuIyx5JdzsdKKJ7ko3OHkZsaqiqdjGRnKvlYY9kZAtEhO+esWeijvu7OgcJN1IqPUCwok28Nawqci32MzHAnEGD47csI2UpZibOjc53oJ6URopQ09d3gXPzEiIyDeLg6LXTL0n+yt6eEsGKLASqVbuq4=----ATTACHMENT:----NDQ0NDAxNzA4NTU3NjUxMCA4NDEzNzI5NTUwMTM1OTEgOTYwODYyMjMyMzg4MjgxOQ==