| @@ 13-47 (lines=35) @@ | ||
| 10 | * |
|
| 11 | * @author Sławomir Kania <[email protected]> |
|
| 12 | */ |
|
| 13 | class MethodGetterInterfaceManagerTest extends BaseManager |
|
| 14 | { |
|
| 15 | ||
| 16 | /** |
|
| 17 | * @var MethodGetterInterfaceManager |
|
| 18 | */ |
|
| 19 | protected $methodGetterInterfaceManager = null; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * SET UP |
|
| 23 | */ |
|
| 24 | public function setUp() |
|
| 25 | { |
|
| 26 | parent::setUp(); |
|
| 27 | ||
| 28 | $methods = $this->preapareClassManager()->getInterface()->getMethods(); |
|
| 29 | $methods->next(); |
|
| 30 | $this->methodGetterInterfaceManager = $methods->current(); |
|
| 31 | } |
|
| 32 | ||
| 33 | public function testManger() |
|
| 34 | { |
|
| 35 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Interfaces\RenderableInterface', $this->methodGetterInterfaceManager); |
|
| 36 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Interfaces\MethodInterface', $this->methodGetterInterfaceManager); |
|
| 37 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Items\MethodManager', $this->methodGetterInterfaceManager); |
|
| 38 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Items\MethodGetterInterfaceManager', $this->methodGetterInterfaceManager); |
|
| 39 | $this->assertEquals('getFullName', $this->methodGetterInterfaceManager->getPreparedName()); |
|
| 40 | } |
|
| 41 | ||
| 42 | public function testValidManagerWhenValid() |
|
| 43 | { |
|
| 44 | $errors = $this->getValidator()->validate($this->methodGetterInterfaceManager); |
|
| 45 | $this->assertEquals(0, $errors->count()); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||
| @@ 13-47 (lines=35) @@ | ||
| 10 | * |
|
| 11 | * @author Sławomir Kania <[email protected]> |
|
| 12 | */ |
|
| 13 | class MethodGetterManagerTest extends BaseManager |
|
| 14 | { |
|
| 15 | ||
| 16 | /** |
|
| 17 | * @var MethodGetterManager |
|
| 18 | */ |
|
| 19 | protected $methodGetterManager = null; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * SET UP |
|
| 23 | */ |
|
| 24 | public function setUp() |
|
| 25 | { |
|
| 26 | parent::setUp(); |
|
| 27 | ||
| 28 | $methods = $this->preapareClassManager()->getMethods(); |
|
| 29 | $methods->next(); |
|
| 30 | $this->methodGetterManager = $methods->current(); |
|
| 31 | } |
|
| 32 | ||
| 33 | public function testManger() |
|
| 34 | { |
|
| 35 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Interfaces\RenderableInterface', $this->methodGetterManager); |
|
| 36 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Interfaces\MethodInterface', $this->methodGetterManager); |
|
| 37 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Items\MethodManager', $this->methodGetterManager); |
|
| 38 | $this->assertInstanceOf('\HelloWordPl\SimpleEntityGeneratorBundle\Lib\Items\MethodGetterManager', $this->methodGetterManager); |
|
| 39 | $this->assertEquals('getFullName', $this->methodGetterManager->getPreparedName()); |
|
| 40 | } |
|
| 41 | ||
| 42 | public function testValidManagerWhenValid() |
|
| 43 | { |
|
| 44 | $errors = $this->getValidator()->validate($this->methodGetterManager); |
|
| 45 | $this->assertEquals(0, $errors->count()); |
|
| 46 | } |
|
| 47 | } |
|
| 48 | ||