Skip to content

Commit aec99df

Browse files
committed
Add LanguageCollection
1 parent 8bc209b commit aec99df

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

src/Debug/LanguageCollection.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of Aplus Framework Language Library.
4+
*
5+
* (c) Natan Felles <natanfelles@gmail.com>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace Framework\Language\Debug;
11+
12+
use Framework\Debug\Collection;
13+
14+
/**
15+
* Class LanguageCollection.
16+
*
17+
* @package language
18+
*/
19+
class LanguageCollection extends Collection
20+
{
21+
protected string $iconPath = __DIR__ . '/icons/language.svg';
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/*
3+
* This file is part of Aplus Framework Language Library.
4+
*
5+
* (c) Natan Felles <natanfelles@gmail.com>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace Tests\Language\Debug;
11+
12+
use Framework\Language\Debug\LanguageCollection;
13+
use PHPUnit\Framework\TestCase;
14+
15+
final class LanguageCollectionTest extends TestCase
16+
{
17+
protected LanguageCollection $collection;
18+
19+
protected function setUp() : void
20+
{
21+
$this->collection = new LanguageCollection('Language');
22+
}
23+
24+
public function testIcon() : void
25+
{
26+
self::assertStringStartsWith('<svg ', $this->collection->getIcon());
27+
}
28+
}

0 commit comments

Comments
 (0)