public function ResultTest::testGetters in Facets 8
Tests getters.
File
- tests/
src/ Unit/ Result/ ResultTest.php, line 34
Class
- ResultTest
- Class ResultTest.
Namespace
Drupal\Tests\facets\Unit\ResultCode
public function testGetters() {
$facet = new Facet([
'id' => 'foo',
], 'facets_facet');
$result = new Result($facet, 11, 'Eleven', 3);
$result
->setCount(11.2);
$this
->assertSame(11, $result
->getCount());
$result
->setDisplayValue('Foo');
$this
->assertSame('Foo', $result
->getDisplayValue());
$url = new Url('foo');
$result
->setUrl($url);
$this
->assertSame($url, $result
->getUrl());
}