Skip to content

Commit

Permalink
Add SessionCollection class
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Apr 1, 2024
1 parent f192604 commit 32a0e35
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Debug/SessionCollection.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 Session 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\Session\Debug;

use Framework\Debug\Collection;

/**
* Class SessionCollection.
*
* @package session
*/
class SessionCollection extends Collection
{
protected string $iconPath = __DIR__ . '/icons/session.svg';
}
28 changes: 28 additions & 0 deletions tests/Debug/SessionCollectionTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/*
* This file is part of Aplus Framework Session 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\Session\Debug;

use Framework\Session\Debug\SessionCollection;
use PHPUnit\Framework\TestCase;

final class SessionCollectionTest extends TestCase
{
protected SessionCollection $collection;

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

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

0 comments on commit 32a0e35

Please sign in to comment.