1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-27 11:40:25 +02:00
Files
php-debugbar/tests/DebugBar/Tests/DataCollector/ConfigCollectorTest.php
Barry vd. Heuvel a01819af85 User VarDumper component
Use the VarDumper component instead of the kintLite method.
2014-11-29 12:35:43 +01:00

29 lines
817 B
PHP

<?php
namespace DebugBar\Tests\DataCollector;
use DebugBar\Tests\DebugBarTestCase;
use DebugBar\DebugBar;
use DebugBar\DataCollector\ConfigCollector;
class ConfigCollectorTest extends DebugBarTestCase
{
public function testCollect()
{
$c = new ConfigCollector(array('s' => 'bar', 'a' => array(), 'o' => new \stdClass()));
$data = $c->collect();
$this->assertArrayHasKey('s', $data);
$this->assertEquals('bar', $data['s']);
$this->assertArrayHasKey('a', $data);
$this->assertEquals("[]", $data['a']);
$this->assertArrayHasKey('o', $data);
}
public function testName()
{
$c = new ConfigCollector(array(), 'foo');
$this->assertEquals('foo', $c->getName());
$this->assertArrayHasKey('foo', $c->getWidgets());
}
}