-
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathSpotlightSearchResultTest.php
More file actions
43 lines (35 loc) · 1.07 KB
/
SpotlightSearchResultTest.php
File metadata and controls
43 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php declare(strict_types=1);
namespace LivewireUI\Spotlight\Tests;
use LivewireUI\Spotlight\SpotlightSearchResult;
class SpotlightSearchResultTest extends \PHPUnit\Framework\TestCase
{
private SpotlightSearchResult $result;
protected function setUp(): void
{
$this->result = new SpotlightSearchResult('::id::', '::name::', '::description::');
}
/** @test */
public function it_can_be_turned_into_an_array(): void
{
self::assertEquals([
'id' => '::id::',
'name' => '::name::',
'description' => '::description::',
], $this->result->toArray());
}
/** @test */
public function it_returns_its_id(): void
{
self::assertEquals('::id::', $this->result->getId());
}
/** @test */
public function it_returns_its_description(): void
{
self::assertEquals('::description::', $this->result->getDescription());
}
/** @test */
public function it_returns_its_name(): void
{
self::assertEquals('::name::', $this->result->getName());
}
}