Example #1
0
 public function testSetPostCategoryWithIds()
 {
     // Given
     $username = '******';
     $password = '******';
     $postId = 1;
     $categoryId = 1;
     $this->xmlRpcClient->expects($this->once())->method('call')->with('mt.setPostCategories', array($postId, $username, $password, array(array('categoryId' => $categoryId))))->will($this->returnValue(true));
     $client = new Client(null, $username, $password, null, $this->xmlRpcClient);
     // When
     $result = $client->setPostCategory($postId, $categoryId);
     // Then
     $this->assertTrue($result);
 }