✨feature: Initial MVP
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
// phpcs:disable PEAR.Commenting.FileComment,PEAR.Commenting.ClassComment
|
||||
|
||||
/**
|
||||
* Board domain tests.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Domain;
|
||||
|
||||
use IronKanban\Domain\Board;
|
||||
use IronKanban\Domain\Column;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Covers board serialization behavior.
|
||||
*/
|
||||
final class BoardTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Ensure a board exposes its columns and metadata as arrays.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testToArrayIncludesSerializedColumnsAndMeta(): void
|
||||
{
|
||||
$board = new Board(
|
||||
'demo-project',
|
||||
[
|
||||
new Column('backlog', 'Backlog', 100),
|
||||
new Column('done', 'Done', 200),
|
||||
],
|
||||
['wip_limit' => 3]
|
||||
);
|
||||
|
||||
self::assertSame(
|
||||
[
|
||||
'project_id' => 'demo-project',
|
||||
'columns' => [
|
||||
['id' => 'backlog', 'label' => 'Backlog', 'order' => 100],
|
||||
['id' => 'done', 'label' => 'Done', 'order' => 200],
|
||||
],
|
||||
'meta' => ['wip_limit' => 3],
|
||||
],
|
||||
$board->toArray()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user