public function testGetPostMetaCollection() { $query = $this->getMockBuilder('Parenthesis\\WPBundle\\Tests\\Manager\\QueryMock')->disableOriginalConstructor()->getMock(); $this->repository->expects($this->once())->method('getPostMetaQuery')->will($this->returnValue($query)); $query->expects($this->once())->method('getResult'); $this->manager->getPostMeta(22, 'test', false); }
/** * @param int $postId A post identifier * @param string $metaName A meta name * @param bool $fetchOneResult Use fetchOneOrNullResult() method instead of getResult()? * * @return array|\Parenthesis\WPBundle\Entity\PostMeta */ public function getPostMeta($postId, $metaName, $fetchOneResult = false) { return $this->postMetaManager->getPostMeta($postId, $metaName, $fetchOneResult); }