Networking\InitCmsBundle\Tests\Entity\PageListenerTest::getMockChildren PHP Метод

getMockChildren() приватный Метод

private getMockChildren ( integer $count ) : array
$count integer
Результат array
    private function getMockChildren($count = 0)
    {
        $array = array();
        for ($i = 0; $i < $count; $i++) {
            $contentRoute = $this->getMock('\\Networking\\InitCmsBundle\\Model\\ContentRoute', array('setPath'));
            $contentRoute->expects($this->once())->method('setPath')->with($this->equalTo('/some/path-p/' . $count));
            $mockPage = $this->getMock('\\Networking\\InitCmsBundle\\Model\\Page');
            $mockPage->expects($this->once())->method('getContentRoute')->will($this->returnValue($contentRoute));
            $mockPage->expects($this->once())->method('getPath')->will($this->returnValue('/some-234/path-p/' . $count));
            $array[] = $mockPage;
        }
        return $array;
    }