* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\AdminBundle\Tests\Block; use Sonata\AdminBundle\Admin\Pool; use Sonata\AdminBundle\Block\AdminStatsBlockService; use Sonata\BlockBundle\Test\AbstractBlockServiceTestCase; /** * @author Sullivan Senechal */ class AdminStatsBlockServiceTest extends AbstractBlockServiceTestCase { /** * @var Pool */ private $pool; protected function setUp() { parent::setUp(); $this->pool = $this->getMockBuilder('Sonata\AdminBundle\Admin\Pool')->disableOriginalConstructor()->getMock(); } public function testDefaultSettings() { $blockService = new AdminStatsBlockService('foo', $this->templating, $this->pool); $blockContext = $this->getBlockContext($blockService); $this->assertSettings(array( 'icon' => 'fa-line-chart', 'text' => 'Statistics', 'color' => 'bg-aqua', 'code' => false, 'filters' => array(), 'limit' => 1000, 'template' => 'SonataAdminBundle:Block:block_stats.html.twig', ), $blockContext); } }