Skip to content

Commit

Permalink
Add some phpdoc to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu authored and OskarStark committed Dec 15, 2020
1 parent 2dd7abf commit 244cf56
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
28 changes: 26 additions & 2 deletions tests/Action/SearchActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Sonata\AdminBundle\Tests\Action;

use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use Sonata\AdminBundle\Action\SearchAction;
use Sonata\AdminBundle\Admin\BreadcrumbsBuilderInterface;
Expand All @@ -26,13 +27,36 @@
use Symfony\Component\HttpFoundation\Response;
use Twig\Environment;

class SearchActionTest extends TestCase
final class SearchActionTest extends TestCase
{
/**
* @var Container
*/
private $container;

/**
* @var Pool
*/
private $pool;

/**
* @var SearchHandler
*/
private $searchHandler;

/**
* @var SearchAction
*/
private $action;

/**
* @var Stub&Environment
*/
private $twig;

/**
* @var Stub&BreadcrumbsBuilderInterface
*/
private $breadcrumbsBuilder;

protected function setUp(): void
Expand All @@ -45,7 +69,7 @@ protected function setUp(): void
'layout' => 'layout.html.twig',
]);

$this->breadcrumbsBuilder = $this->createMock(BreadcrumbsBuilderInterface::class);
$this->breadcrumbsBuilder = $this->createStub(BreadcrumbsBuilderInterface::class);
$this->searchHandler = new SearchHandler(true);
$this->twig = $this->createStub(Environment::class);

Expand Down
4 changes: 2 additions & 2 deletions tests/Block/AdminSearchBlockServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* @author Sullivan Senechal <[email protected]>
*/
class AdminSearchBlockServiceTest extends BlockServiceTestCase
final class AdminSearchBlockServiceTest extends BlockServiceTestCase
{
use ExpectDeprecationTrait;

Expand Down Expand Up @@ -101,7 +101,7 @@ public function testGlobalSearchReturnsEmptyWhenFiltersAreDisabled(): void
->willReturn($adminCode);

$blockService = new AdminSearchBlockService(
$this->createMock(Environment::class),
$this->createStub(Environment::class),
$this->pool,
$this->searchHandler,
'show'
Expand Down

0 comments on commit 244cf56

Please sign in to comment.