photos wip - almost there
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user