Browse Source

Completed PoolTest for full unit tests coverage

Andrej Hudec 11 years ago
parent
commit
65a252f157
1 changed files with 18 additions and 1 deletions
  1. 18 1
      Tests/Admin/PoolTest.php

+ 18 - 1
Tests/Admin/PoolTest.php

@@ -22,7 +22,7 @@ class PoolTest extends \PHPUnit_Framework_TestCase
 
     public function setUp()
     {
-        $this->pool = new Pool($this->getContainer(), 'Sonata Admin', '/path/to/pic.png');
+        $this->pool = new Pool($this->getContainer(), 'Sonata Admin', '/path/to/pic.png', array('foo'=>'bar'));
     }
 
     public function testGetGroups()
@@ -194,6 +194,23 @@ class PoolTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('Foo.html.twig', $this->pool->getTemplate('ajax'));
     }
 
+    public function testGetTitleLogo()
+    {
+        $this->assertEquals('/path/to/pic.png', $this->pool->getTitleLogo());
+    }
+
+    public function testGetTitle()
+    {
+        $this->assertEquals('Sonata Admin', $this->pool->getTitle());
+    }
+
+    public function testGetOption()
+    {
+        $this->assertEquals('bar', $this->pool->getOption('foo'));
+
+        $this->assertEquals(null, $this->pool->getOption('non_existent_option'));
+    }
+
     /**
      * @return Symfony\Component\DependencyInjection\ContainerInterface - the mock of container interface
      */