Bolt\Tests\Twig\RecordHandlerTest::testListTemplatesTemplateSelect PHP Method

testListTemplatesTemplateSelect() public method

    public function testListTemplatesTemplateSelect()
    {
        $app = $this->getApp();
        $app['config']->set('theme/templateselect/templates', ['koala' => ['name' => 'Koala', 'filename' => 'extrafields.twig'], 'clippy' => ['name' => 'Clippy', 'filename' => 'anotherextrafields.twig']]);
        $handler = new RecordHandler($app);
        $result = $handler->listTemplates('*extra*', false);
        $this->assertArrayHasKey('extrafields.twig', $result);
        $this->assertArrayHasKey('anotherextrafields.twig', $result);
        $this->assertContains('Koala', $result);
        $this->assertContains('Clippy', $result);
        $this->assertArrayNotHasKey('entry.twig', $result);
        $this->assertArrayNotHasKey('index.twig', $result);
        $this->assertArrayNotHasKey('listing.twig', $result);
        $this->assertArrayNotHasKey('record.twig', $result);
    }