Articles: finish admin refactor, uploads hardening, and attachment sorting (0.262)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user