Skip to content

Commit ebcec7d

Browse files
committed
Add AutoloadCollection
1 parent 6dca19d commit ebcec7d

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

src/Debug/AutoloadCollection.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 Autoload Library.
4+
*
5+
* (c) Natan Felles <[email protected]>
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\Autoload\Debug;
11+
12+
use Framework\Debug\Collection;
13+
14+
/**
15+
* Class AutoloadCollection.
16+
*
17+
* @package autoload
18+
*/
19+
class AutoloadCollection extends Collection
20+
{
21+
protected string $iconPath = __DIR__ . '/icons/autoload.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 Autoload Library.
4+
*
5+
* (c) Natan Felles <[email protected]>
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\Autoload\Debug;
11+
12+
use Framework\Autoload\Debug\AutoloadCollection;
13+
use PHPUnit\Framework\TestCase;
14+
15+
final class AutoloadCollectionTest extends TestCase
16+
{
17+
protected AutoloadCollection $collection;
18+
19+
protected function setUp() : void
20+
{
21+
$this->collection = new AutoloadCollection('Autoload');
22+
}
23+
24+
public function testIcon() : void
25+
{
26+
self::assertStringStartsWith('<svg ', $this->collection->getIcon());
27+
}
28+
}

tests/LocatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ protected function getFiles() : array
3131
{
3232
return [
3333
__DIR__ . '/AutoloaderTest.php',
34+
__DIR__ . '/Debug/AutoloadCollectionTest.php',
3435
__DIR__ . '/Debug/AutoloadCollectorTest.php',
3536
__FILE__,
3637
__DIR__ . '/PreloaderTest.php',

0 commit comments

Comments
 (0)