Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions tests/Aggregation/AbstractSimpleAggregationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@

use Elastica\Aggregation\AbstractSimpleAggregation;
use Elastica\Exception\InvalidException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\Attributes\Group;

/**
* @internal
*/
#[Group('unit')]
class AbstractSimpleAggregationTest extends BaseAggregationTestCase
{
/**
* @var AbstractSimpleAggregation&MockObject
*/
private MockObject $aggregation;
private AbstractSimpleAggregation $aggregation;

protected function setUp(): void
{
$this->aggregation = $this->createMock(AbstractSimpleAggregation::class);
parent::setUp();

// A mock would replace toArray(), the method under test, so use a real subclass with no params set.
$this->aggregation = new class('test') extends AbstractSimpleAggregation {};
}

public function testToArrayThrowsExceptionOnUnsetParams(): void
Expand Down
Loading