public function testSitemapModel()
    {
        Yii::$app->cache->flush();
        $sitemap = new Sitemap(['models' => ['assayerpro\\sitemap\\tests\\unit\\Article', ['class' => 'assayerpro\\sitemap\\tests\\unit\\Gallery', 'behaviors' => ['sitemap' => ['class' => 'assayerpro\\sitemap\\behaviors\\SitemapBehavior', 'dataClosure' => function ($model) {
            /** @var \yii\db\ActiveQuery $model */
            return ['loc' => $model->url, 'changefreq' => \assayerpro\sitemap\Sitemap::WEEKLY, 'priority' => 0.8];
        }]]]]]);
        $expectedXML = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"><url><loc>http://www.example.com/article/1-article-one</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://www.example.com/article/2-article-two</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://www.example.com/article/3-article-with-long-long-long-title</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://www.example.com/gallery/1-first-gallery</loc><changefreq>weekly</changefreq><priority>0.8</priority></url><url><loc>http://www.example.com/gallery/2-landscape</loc><changefreq>weekly</changefreq><priority>0.8</priority></url></urlset>
EOF;
        $this->assertEquals($expectedXML, $sitemap->render()[0]['xml']);
    }