photos wip - almost there

This commit is contained in:
2025-08-22 00:41:57 -07:00
parent 803e161a9a
commit 9636cc9091
3 changed files with 43 additions and 5 deletions

View File

@@ -347,4 +347,28 @@ class ProductPhotosControllerTest extends BaseControllerTest
$cntAfter = $this->ProductPhotos->find()->count();
$this->assertEquals($cntBefore - 1, $cntAfter);
}
/**
* Test image method
*
* Tests the image action with a logged in user
*
* @return void
* @throws Exception
*
* @uses ProductPhotosController::image
*/
public function testImageGetLoggedIn(): void
{
$id = '2c386086-f4c5-4093-bea5-ee9c29479f58';
// $this->loginUserByRole('admin');
$url = [
'plugin' => 'CakeProducts',
'controller' => 'ProductPhotos',
'action' => 'image',
$id,
];
$this->get($url);
$this->assertResponseCode(200);
}
}