em->clear(); return self::getContainer()->get(BlogRepository::class)->findByUuid($uuid)->getBody(); } public function testScriptTagIsStrippedOnCreate(): void { $admin = $this->createUser(['ROLE_ADMIN']); $res = $this->authJson('POST', '/api/v1/blog', $admin, [ 'title' => 'مقالهٔ تست', 'body' => '
سلام
', ]); $this->assertSame(201, $this->responseCode()); $body = $this->storedBody($res['data']['data']['uuid'] ?? $res['data']['uuid']); $this->assertStringNotContainsString('', ]); $this->assertSame(200, $this->responseCode()); $body = $this->storedBody($uuid); $this->assertStringNotContainsString('', ]); $this->assertSame(422, $this->responseCode()); } }