Skip to content

Commit

Permalink
Add LanguageCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Mar 20, 2024
1 parent 8bc209b commit aec99df
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Debug/LanguageCollection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php declare(strict_types=1);
/*
* This file is part of Aplus Framework Language Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Framework\Language\Debug;

use Framework\Debug\Collection;

/**
* Class LanguageCollection.
*
* @package language
*/
class LanguageCollection extends Collection
{
protected string $iconPath = __DIR__ . '/icons/language.svg';
}
28 changes: 28 additions & 0 deletions tests/Debug/LanguageCollectionTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/*
* This file is part of Aplus Framework Language Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\Language\Debug;

use Framework\Language\Debug\LanguageCollection;
use PHPUnit\Framework\TestCase;

final class LanguageCollectionTest extends TestCase
{
protected LanguageCollection $collection;

protected function setUp() : void
{
$this->collection = new LanguageCollection('Language');
}

public function testIcon() : void
{
self::assertStringStartsWith('<svg ', $this->collection->getIcon());
}
}

0 comments on commit aec99df

Please sign in to comment.