Skip to content

Commit

Permalink
test: add framework admin controller mock
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 20, 2023
1 parent 5a24c0c commit 68d04f2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
require __DIR__ . '/../vendor/myparcelnl/pdk/tests/Pest.php';
require __DIR__ . '/mock_namespaced_class_map.php';
require __DIR__ . '/mock_class_map.php';
require __DIR__ . '/mock_namespaced_class_map_after.php';

const _PS_ROOT_DIR_ = '/var/www/html/';
const _PS_CORE_DIR_ = _PS_ROOT_DIR_;
Expand Down
7 changes: 0 additions & 7 deletions tests/mock_namespaced_class_map.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,3 @@ public function hydrate(array $keyValueData): void;
public function save(): void;
}

namespace PrestaShopBundle\Exception;

use Exception;

class InvalidModuleException extends Exception
{
}
24 changes: 24 additions & 0 deletions tests/mock_namespaced_class_map_after.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/** @noinspection AutoloadingIssuesInspection,PhpIllegalPsrClassPathInspection */

declare(strict_types=1);

namespace PrestaShopBundle\Exception;

use Exception;

class InvalidModuleException extends Exception
{
}

namespace Symfony\Bundle\FrameworkBundle\Controller;

use MyParcelNL\PrestaShop\Tests\Mock\BaseMock;

abstract class AbstractController extends BaseMock { }

namespace PrestaShopBundle\Controller\Admin;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class FrameworkBundleAdminController extends AbstractController { }

0 comments on commit 68d04f2

Please sign in to comment.