-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests for consistency controller
- fixed getting request parameter - removed unused template code - add automatic fix for modules - change 403 to 404 (obscurity adds some security)
- Loading branch information
1 parent
0acb8a5
commit 9d15fc1
Showing
4 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: keywan | ||
* Date: 04.01.19 | ||
* Time: 00:01 | ||
*/ | ||
|
||
namespace OxidCommunity\ModuleInternals\Tests\Integration\Controller; | ||
|
||
use OxidEsales\TestingLibrary\UnitTestCase; | ||
use OxidCommunity\ModuleInternals\Controller\CheckConsistency; | ||
use OxidEsales\Eshop\Core\Utils; | ||
use OxidEsales\Eshop\Core\Registry; | ||
|
||
class CheckConsistencyTest extends UnitTestCase | ||
{ | ||
|
||
public function testRender() | ||
{ | ||
$controller = oxNew(CheckConsistency::class); | ||
$result = $controller->render(); | ||
$this->assertSame('checkconsistency.tpl', $result); | ||
} | ||
|
||
public function testInit() | ||
{ | ||
$controller = oxNew(CheckConsistency::class); | ||
$mockBuilder = $this->getMockBuilder(Utils::class); | ||
$mockBuilder->setMethods(['handlePageNotFoundError']); | ||
$utils = $mockBuilder->getMock(); | ||
$utils->expects($this->once())->method("handlePageNotFoundError"); | ||
Registry::set(Utils::class, $utils); | ||
$controller->init(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters