repin() public method

Make a repin.
public repin ( integer $repinId, integer $boardId, string $description = '' ) : array
$repinId integer
$boardId integer
$description string
return array
 /** @test */
 public function it_should_create_repin()
 {
     $this->apiShouldCreatePin();
     $boardId = 1;
     $repinId = 11;
     $pinDescription = 'Pin Description';
     $this->assertNotEmpty($this->provider->repin($repinId, $boardId, $pinDescription));
     $this->apiShouldReturnError()->assertEmpty($this->provider->repin($repinId, $boardId, $pinDescription));
 }
Example #2
0
 public function testRepin()
 {
     $response = $this->createPinCreationResponse();
     $this->mock->expects($this->at(1))->method('exec')->willReturn($response);
     $repinId = 11;
     $pinDescription = 'Pin Description';
     $boardId = 1;
     $this->assertNotFalse($this->provider->repin($repinId, $boardId, $pinDescription));
     $this->assertFalse($this->provider->repin($repinId, $boardId, $pinDescription));
 }
Example #3
0
 /** @test */
 public function createARepin()
 {
     $response = $this->createPinCreationResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturnNull();
     $boardId = 1;
     $repinId = 11;
     $pinDescription = 'Pin Description';
     $this->assertNotFalse($this->provider->repin($repinId, $boardId, $pinDescription));
     $this->assertFalse($this->provider->repin($repinId, $boardId, $pinDescription));
 }