File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace PHPFastCGI \Test \FastCGIDaemon ;
4+
5+ use PHPFastCGI \FastCGIDaemon \ApplicationFactory ;
6+
7+ /**
8+ * Tests the daemon.
9+ */
10+ class ApplicationFactoryTest extends \PHPUnit_Framework_TestCase
11+ {
12+ /**
13+ * Tests that the factory can create a Symfony console application
14+ */
15+ public function testCreateApplication ()
16+ {
17+ $ applicationFactory = new ApplicationFactory ;
18+
19+ $ name = 'foo ' ;
20+ $ description = 'bar ' ;
21+
22+ $ application = $ applicationFactory ->createApplication (function () { }, $ name , $ description );
23+
24+ $ this ->assertInstanceOf ('Symfony \\Component \\Console \\Application ' , $ application );
25+ $ this ->assertTrue ($ application ->has ($ name ));
26+ $ this ->assertEquals ($ description , $ application ->get ($ name )->getDescription ());
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments