Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
zds-s committed Feb 6, 2024
1 parent e6d60f4 commit d943435
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/app-store/src/Abstracts/AbstractExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ abstract class AbstractExtension
*/
public string $homePage;


public function __construct(
public ContainerInterface $container
) {}
Expand Down
23 changes: 17 additions & 6 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,25 @@
* @contact [email protected]
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE
*/
uses(Mine\Tests\TestCase::class)
->beforeEach(function (){
$mockConfig = Mockery::mock(\Hyperf\Contract\ConfigInterface::class);
use Hyperf\Context\ApplicationContext;
use Hyperf\Contract\ConfigInterface;
use Mine\Tests\TestCase;

/**
* This file is part of MineAdmin.
*
* @see https://www.mineadmin.com
* @document https://doc.mineadmin.com
* @contact [email protected]
* @license https://github.com/mineadmin/MineAdmin/blob/master/LICENSE
*/
uses(TestCase::class)
->beforeEach(function () {
$mockConfig = Mockery::mock(ConfigInterface::class);
$mockConfig->allows('has')->andReturn(true);
$mockConfig->allows('get')->andReturn([]);
$mockConfig->allows('set')->andReturn(true);
\Hyperf\Context\ApplicationContext::getContainer()
->set(\Hyperf\Contract\ConfigInterface::class,$mockConfig);
ApplicationContext::getContainer()
->set(ConfigInterface::class, $mockConfig);
})
->in('Feature');

0 comments on commit d943435

Please sign in to comment.