Visual Console Refactor: the group item now passes the tests
Former-commit-id: 2a967ef0a23c02fdb89352df65e8d5380cdd31f7
This commit is contained in:
parent
9e74d6f0d1
commit
112f7ab7ed
|
@ -29,6 +29,7 @@ class GroupTest extends TestCase
|
|||
'height' => '500',
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
@ -43,6 +44,7 @@ class GroupTest extends TestCase
|
|||
'height' => '500',
|
||||
'image' => 'test_image.png',
|
||||
'id_group' => 0,
|
||||
'statusImageSrc' => 'test_image.bad.jpg',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
@ -119,6 +121,7 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'test.jpg',
|
||||
'groupId' => 'bar',
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
]
|
||||
);
|
||||
// Missing groupId.
|
||||
|
@ -136,6 +139,7 @@ class GroupTest extends TestCase
|
|||
'x' => -666,
|
||||
'y' => 76,
|
||||
'imageSrc' => 'test.jpg',
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
@ -149,7 +153,7 @@ class GroupTest extends TestCase
|
|||
public function testContainerIsRepresentedAsJson(): void
|
||||
{
|
||||
$this->assertEquals(
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":null,"linkedLayoutStatusType":"default","parentId":null,"type":11,"width":0,"x":-666,"y":76}',
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":null,"linkedLayoutStatusType":"default","parentId":null,"statusImageSrc":"image.bad.jpg","type":11,"width":0,"x":-666,"y":76}',
|
||||
(string) Group::fromArray(
|
||||
[
|
||||
'id' => 7,
|
||||
|
@ -165,13 +169,14 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
// With a linked layout.
|
||||
$this->assertEquals(
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":1,"linkedLayoutStatusType":"default","parentId":null,"type":11,"width":0,"x":-666,"y":76}',
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":1,"linkedLayoutStatusType":"default","parentId":null,"statusImageSrc":"image.bad.jpg","type":11,"width":0,"x":-666,"y":76}',
|
||||
(string) Group::fromArray(
|
||||
[
|
||||
'id' => 7,
|
||||
|
@ -187,13 +192,14 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
'id_layout_linked' => 1,
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":3,"linkedLayoutId":2,"linkedLayoutStatusType":"default","metaconsoleId":5,"parentId":null,"type":11,"width":0,"x":-666,"y":76}',
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":3,"linkedLayoutId":2,"linkedLayoutStatusType":"default","metaconsoleId":5,"parentId":null,"statusImageSrc":"image.bad.jpg","type":11,"width":0,"x":-666,"y":76}',
|
||||
(string) Group::fromArray(
|
||||
[
|
||||
'id' => 7,
|
||||
|
@ -209,6 +215,7 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
'id_metaconsole' => 5,
|
||||
'linked_layout_node_id' => 3,
|
||||
'linkedLayoutId' => 2,
|
||||
|
@ -216,7 +223,7 @@ class GroupTest extends TestCase
|
|||
)
|
||||
);
|
||||
$this->assertEquals(
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":3,"linkedLayoutId":2,"linkedLayoutStatusType":"weight","linkedLayoutStatusTypeWeight":80,"metaconsoleId":5,"parentId":null,"type":11,"width":0,"x":-666,"y":76}',
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":3,"linkedLayoutId":2,"linkedLayoutStatusType":"weight","linkedLayoutStatusTypeWeight":80,"metaconsoleId":5,"parentId":null,"statusImageSrc":"image.bad.jpg","type":11,"width":0,"x":-666,"y":76}',
|
||||
(string) Group::fromArray(
|
||||
[
|
||||
'id' => 7,
|
||||
|
@ -232,6 +239,7 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
'id_metaconsole' => 5,
|
||||
'linked_layout_node_id' => 3,
|
||||
'linkedLayoutId' => 2,
|
||||
|
@ -241,7 +249,7 @@ class GroupTest extends TestCase
|
|||
)
|
||||
);
|
||||
$this->assertEquals(
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":2,"linkedLayoutStatusType":"service","linkedLayoutStatusTypeCriticalThreshold":80,"linkedLayoutStatusTypeWarningThreshold":50,"parentId":null,"type":11,"width":0,"x":-666,"y":76}',
|
||||
'{"aclGroupId":null,"groupId":12,"height":0,"id":7,"imageSrc":"image.jpg","isLinkEnabled":true,"isOnTop":false,"label":null,"labelPosition":"up","linkedLayoutAgentId":null,"linkedLayoutId":2,"linkedLayoutStatusType":"service","linkedLayoutStatusTypeCriticalThreshold":80,"linkedLayoutStatusTypeWarningThreshold":50,"parentId":null,"statusImageSrc":"image.bad.jpg","type":11,"width":0,"x":-666,"y":76}',
|
||||
(string) Group::fromArray(
|
||||
[
|
||||
'id' => 7,
|
||||
|
@ -257,6 +265,7 @@ class GroupTest extends TestCase
|
|||
'y' => 76,
|
||||
'imageSrc' => 'image.jpg',
|
||||
'groupId' => 12,
|
||||
'statusImageSrc' => 'image.bad.jpg',
|
||||
'linkedLayoutId' => 2,
|
||||
'linked_layout_status_type' => 'service',
|
||||
'linkedLayoutStatusTypeWarningThreshold' => 50,
|
||||
|
|
Loading…
Reference in New Issue