FOSSology
4.4.0
Open Source License Compliance by Open Source Software
ObligationTest.php
Go to the documentation of this file.
1
<?php
2
/*
3
SPDX-FileCopyrightText: © 2021 Siemens AG
4
Author: Gaurav Mishra <mishra.gaurav@siemens.com>
5
6
SPDX-License-Identifier: GPL-2.0-only
7
*/
13
namespace
Fossology\UI\Api\Test\Models
;
14
15
use
Fossology\UI\Api\Models\Obligation
;
16
21
class
ObligationTest
extends
\PHPUnit\Framework\TestCase
22
{
27
public
function
testDataFormat
()
28
{
29
$expectedObligation = [
30
'id'
=> 123,
31
'topic'
=>
'My obligation'
,
32
'type'
=>
'Obligation'
,
33
'text'
=>
'This should represent some valid obligation text.'
,
34
'classification'
=>
'yellow'
,
35
'comment'
=>
""
36
];
37
38
$actualObligation =
new
Obligation
(
"123"
,
'My obligation'
,
'Obligation'
,
39
'This should represent some valid obligation text.'
,
'yellow'
);
40
41
$this->assertEquals($expectedObligation, $actualObligation->getArray());
42
}
43
}
Fossology\UI\Api\Models\Obligation
Definition:
Obligation.php:20
Fossology\UI\Api\Test\Models\ObligationTest
Test for Obligation model.
Definition:
ObligationTest.php:22
Fossology\UI\Api\Test\Models\ObligationTest\testDataFormat
testDataFormat()
Definition:
ObligationTest.php:27
Fossology\UI\Api\Test\Models
src
www
ui_tests
api
Models
ObligationTest.php
Generated on Mon Nov 18 2024 07:37:14 for FOSSology by
1.9.1