Articles: finish admin refactor, uploads hardening, and attachment sorting (0.262)

This commit is contained in:
2026-02-13 09:00:24 +01:00
parent e984548516
commit 3e1f417ef3
31 changed files with 1951 additions and 1512 deletions

View File

@@ -56,6 +56,26 @@ class ArticlesControllerTest extends TestCase
$this->assertTrue(method_exists($this->controller, 'galleryOrderSave'));
}
public function testHasImageAltChangeMethod(): void
{
$this->assertTrue(method_exists($this->controller, 'imageAltChange'));
}
public function testHasFileNameChangeMethod(): void
{
$this->assertTrue(method_exists($this->controller, 'fileNameChange'));
}
public function testHasImageDeleteMethod(): void
{
$this->assertTrue(method_exists($this->controller, 'imageDelete'));
}
public function testHasFileDeleteMethod(): void
{
$this->assertTrue(method_exists($this->controller, 'fileDelete'));
}
public function testListMethodReturnType(): void
{
$reflection = new \ReflectionClass($this->controller);
@@ -74,6 +94,30 @@ class ArticlesControllerTest extends TestCase
$this->assertEquals('void', (string)$reflection->getMethod('galleryOrderSave')->getReturnType());
}
public function testImageAltChangeMethodReturnType(): void
{
$reflection = new \ReflectionClass($this->controller);
$this->assertEquals('void', (string)$reflection->getMethod('imageAltChange')->getReturnType());
}
public function testFileNameChangeMethodReturnType(): void
{
$reflection = new \ReflectionClass($this->controller);
$this->assertEquals('void', (string)$reflection->getMethod('fileNameChange')->getReturnType());
}
public function testImageDeleteMethodReturnType(): void
{
$reflection = new \ReflectionClass($this->controller);
$this->assertEquals('void', (string)$reflection->getMethod('imageDelete')->getReturnType());
}
public function testFileDeleteMethodReturnType(): void
{
$reflection = new \ReflectionClass($this->controller);
$this->assertEquals('void', (string)$reflection->getMethod('fileDelete')->getReturnType());
}
public function testConstructorRequiresArticleRepository(): void
{
$reflection = new \ReflectionClass(ArticlesController::class);