public function testData() { $profiler = ProfilerFactory::build([ProfilerFactory::OPTION_ENABLE => true, ProfilerFactory::OPTION_DATASOURCE_CLASS => File::class, ProfilerFactory::OPTION_DATASOURCE_PROFILES_FOLDER => '/tmp']); $renderer = new Database(["value" => [['query' => 'SELECT foo FROM bar where id = ?', 'bindQuery' => 'SELECT foo FROM bar where id = 1', 'bindings' => ['id' => 1], 'duration' => microtime(true), 'connection' => 'mysql', 'explain' => []]]], $profiler); $this->assertFalse($renderer->getBarContent()); $this->assertInternalType('array', $renderer->getData()); $this->assertNotEmpty($renderer->getData()); $this->assertNotEmpty($renderer->getTitle()); $this->assertEmpty($renderer->getBarContent()); $this->assertEquals('Database (1)', $renderer->getBadge()); $this->assertNotEmpty($renderer->getIcon()); $this->assertNotEmpty($renderer->content()); }