Skip to content

Commit 95e06d5

Browse files
committed
reactivate unit test
1 parent b45d664 commit 95e06d5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Diff for: tests/Unit/Aggregation/Bucketing/AdjacencyMatrixAggregationTest.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@
1212
namespace ONGR\ElasticsearchDSL\Tests\Unit\Aggregation\Bucketing;
1313

1414
use ONGR\ElasticsearchDSL\Aggregation\Bucketing\AdjacencyMatrixAggregation;
15+
use ONGR\ElasticsearchDSL\Aggregation\Bucketing\FiltersAggregation;
1516

1617
/**
1718
* Unit test for adjacency matrix aggregation.
1819
*/
1920
class AdjacencyMatrixAggregationTest extends \PHPUnit\Framework\TestCase
2021
{
21-
// /**
22-
// * Test if exception is thrown when not anonymous filter is without name.
23-
// *
24-
// * @expectedException \LogicException
25-
// * @expectedExceptionMessage In not anonymous filters filter name must be set.
26-
// */
27-
// public function testIfExceptionIsThrown()
28-
// {
29-
// $mock = $this->getMockBuilder('ONGR\ElasticsearchDSL\BuilderInterface')->getMock();
30-
// $aggregation = new FiltersAggregation('test_agg');
31-
// $aggregation->addFilter($mock);
32-
// }
22+
/**
23+
* Test if exception is thrown when not anonymous filter is without name.
24+
*/
25+
public function testIfExceptionIsThrown()
26+
{
27+
$this->expectException(\LogicException::class);
28+
$this->expectExceptionMessage("In not anonymous filters filter name must be set.");
29+
$mock = $this->getMockBuilder('ONGR\ElasticsearchDSL\BuilderInterface')->getMock();
30+
$aggregation = new FiltersAggregation('test_agg');
31+
$aggregation->addFilter($mock);
32+
}
3333

3434
/**
3535
* Test GetArray method.

0 commit comments

Comments
 (0)