ChartAttachmentServiceTest.php in Charts 8.3
File
tests/src/Unit/Services/ChartAttachmentServiceTest.php
View source
<?php
namespace Drupal\Tests\charts\Unit\Services;
use Drupal\Tests\UnitTestCase;
use Drupal\charts\Services\ChartAttachmentService;
class ChartAttachmentServiceTest extends UnitTestCase {
private $chartAttachmentService;
public function setUp() {
parent::setUp();
$this->chartAttachmentService = new ChartAttachmentService();
}
public function testAttachmentViews(array $attachmentViews) {
$this->chartAttachmentService
->setAttachmentViews($attachmentViews);
$this
->assertArrayEquals($attachmentViews, $this->chartAttachmentService
->getAttachmentViews());
}
public function attachmentViews() {
(yield [
[
new \stdClass(),
],
]);
}
}