Skip to content

Commit 5a71f3c

Browse files
committed
improve tests
1 parent 8e028d1 commit 5a71f3c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/Loader/DescriptorLoaderTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,4 +351,16 @@ public function testLoadSortableAnnotatedClasses() : void
351351
return $route->getName();
352352
}, $routes->all()));
353353
}
354+
355+
/**
356+
* @return void
357+
*/
358+
public function testLoadAbstractAnnotatedClass() : void
359+
{
360+
$loader = new DescriptorLoader();
361+
$loader->attach(Fixtures\Controllers\Annotated\AbstractAnnotatedController::class);
362+
363+
$routes = $loader->load();
364+
$this->assertFalse($routes->has('abstract-annotated-controller'));
365+
}
354366
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Sunrise\Http\Router\Tests\Fixtures\Controllers\Annotated;
4+
5+
use Sunrise\Http\Router\Tests\Fixtures\Controllers\AbstractController;
6+
7+
/**
8+
* @Route("abstract-annotated-controller", path="/")
9+
*/
10+
abstract class AbstractAnnotatedController extends AbstractController
11+
{
12+
}

0 commit comments

Comments
 (0)