format("c"); return sodium_bin2base64(sodium_crypto_sign($message, $sign_secret), SODIUM_BASE64_VARIANT_URLSAFE); } public function testCreateDojo(): void { /** * * @var Response $response */ $response = static::createClient()->request('POST', '/api/dojos', [ 'headers' => [ 'accept' => 'application/json', 'X-AUTH-TOKEN' => $this->generateAuthToken('blablabla') ], 'json' => [ 'name' => 'FooBar' ] ]); $this->assertResponseStatusCodeSame(201); $userRepository = $this->getContainer()->get(UserRepository::class); $this->assertCount(1, $userRepository->findAll()); } }