File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
dev/tests/integration/testsuite/Magento/MediaGallery Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \MediaGalleryApi \Model \Asset \Command \GetByIdInterface ;
15
15
16
16
/**
17
- * Test methods of class DeleteByPath
17
+ * Test methods of class DeleteByAssertIdTest
18
18
*/
19
19
class DeleteByAssertIdTest extends \PHPUnit \Framework \TestCase
20
20
{
@@ -24,7 +24,7 @@ class DeleteByAssertIdTest extends \PHPUnit\Framework\TestCase
24
24
private CONST TEST_DIRECTORY_NAME = 'testDirectory ' ;
25
25
26
26
/**
27
- * Absolute path to the media direcrory
27
+ * Absolute path to the media directory
28
28
*/
29
29
private static $ _mediaPath ;
30
30
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ declare (strict_types=1 );
8
+
9
+ use Magento \MediaGalleryApi \Model \Asset \Command \DeleteByPathInterface ;
10
+ use Magento \TestFramework \Helper \Bootstrap ;
11
+
12
+ $ objectManager = Bootstrap::getObjectManager ();
13
+
14
+ /** @var DeleteByPathInterface $mediaSave */
15
+ $ mediaAssetDelete = $ objectManager ->get (DeleteByPathInterface::class);
16
+
17
+ try {
18
+ $ mediaAssetDelete ->execute ('testDirectory/path.jpg ' );
19
+ } catch (\Exception $ exception ) {
20
+
21
+ }
22
+
You can’t perform that action at this time.
0 commit comments