/** @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)); }
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)); }
/** @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)); }