modules() публичный Метод

Access all project module configs
public modules ( ) : array
Результат array
Пример #1
0
 public function testModule()
 {
     $p = new Project(new Config(array('databases' => array('testdb' => Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite'))), 'defaultDb' => 'testdb')), array('Test' => new Config(array('some' => 'thing'))), new Router(array('Pop\\Mvc\\Controller' => new Controller())));
     $this->assertInstanceOf('Pop\\Config', $p->module('Test'));
     $this->assertTrue($p->isLoaded('Test'));
     $this->assertTrue(is_array($p->modules()));
     $this->assertEquals(1, count($p->modules()));
     $this->assertNull($p->module('BadModule'));
 }