mirror of
https://github.com/Karaka-Management/oms-Comments.git
synced 2026-02-07 21:18:41 +00:00
update composer and fix tests and add gitignore
This commit is contained in:
parent
57dbbda112
commit
6a7cc29799
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
vendor
|
||||
|
|
@ -57,7 +57,7 @@ class Comment
|
|||
* @var int|CommentList
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private int $list = 0;
|
||||
private $list = 0;
|
||||
|
||||
/**
|
||||
* Title
|
||||
|
|
@ -191,11 +191,11 @@ class Comment
|
|||
/**
|
||||
* Get the list this comment belongs to
|
||||
*
|
||||
* @return int
|
||||
* @return int|CommentList
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getList() : int
|
||||
public function getList()
|
||||
{
|
||||
return $this->list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,13 +8,11 @@
|
|||
}
|
||||
],
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5",
|
||||
"phpunit/phpunit": "^9.2",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"phpmd/phpmd": "^2.6",
|
||||
"phpstan/phpstan": "^0.12.18",
|
||||
"phan/phan": "^1.1.5",
|
||||
"codeclimate/php-test-reporter": "^0.4.4",
|
||||
"facebook/webdriver": "^1.7",
|
||||
"friendsofphp/php-cs-fixer": "^2.16.1",
|
||||
"johnkary/phpunit-speedtrap": "^3.1"
|
||||
},
|
||||
|
|
|
|||
2009
composer.lock
generated
2009
composer.lock
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -33,13 +33,13 @@ class CommentListTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$list = new CommentList();
|
||||
$comment = new Comment();
|
||||
$comment->setTitle('Test Comment');
|
||||
$comment->setTitle('Test Title');
|
||||
$comment->setContentRaw('TestRaw');
|
||||
$comment->setContent('TestContent');
|
||||
$comment->setContent('Test Content');
|
||||
|
||||
$list->addComment($comment);
|
||||
self::assertEquals('Test Comment', $list->getComments()[0]->getTitle());
|
||||
self::assertEquals('Test Comment', $list->getComments()[0]->getContentRaw());
|
||||
self::assertEquals('Test Comment', $list->getComments()[0]->getcontent());
|
||||
self::assertEquals('Test Title', $list->getComments()[0]->getTitle());
|
||||
self::assertEquals('TestRaw', $list->getComments()[0]->getContentRaw());
|
||||
self::assertEquals('Test Content', $list->getComments()[0]->getcontent());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ class CommentMapperTest extends \PHPUnit\Framework\TestCase
|
|||
self::assertEquals($comment->getTitle(), $commentR->getTitle());
|
||||
self::assertEquals($comment->getContent(), $commentR->getContent());
|
||||
self::assertEquals($comment->getRef(), $commentR->getRef());
|
||||
self::assertEquals($comment->getList(), $commentR->getList());
|
||||
self::assertEquals($comment->getList()->getId(), $commentR->getList()->getId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user