Example #1
0
 public function testData()
 {
     $profiler = ProfilerFactory::build([ProfilerFactory::OPTION_ENABLE => true, ProfilerFactory::OPTION_DATASOURCE_CLASS => File::class, ProfilerFactory::OPTION_DATASOURCE_PROFILES_FOLDER => '/tmp']);
     $renderer = new Response(["value" => ['status' => ['code' => '200', 'text' => 'ok'], 'charset' => 'utf8', 'maxAge' => null, 'expires' => null, 'lastModified' => null, 'ttl' => null]], $profiler);
     $this->assertFalse($renderer->getBarContent());
     $this->assertInternalType('array', $renderer->getData());
     $this->assertNotEmpty($renderer->getData());
     $this->assertNotEmpty($renderer->getTitle());
     $this->assertEmpty($renderer->getBarContent());
     $this->assertEquals('200', $renderer->getBadge());
     $this->assertNotEmpty($renderer->getIcon());
     $this->assertNotEmpty($renderer->content());
 }