/** * @covers WindowsAzure\Blob\Models\BreakLeaseResult::create */ public function testCreate() { // Setup $expected = '10'; $headers = array('x-ms-lease-time' => $expected); // Test $result = BreakLeaseResult::create($headers); // Assert $this->assertEquals($expected, $result->getLeaseTime()); }
/** * Ends the lease but ensure that another client cannot acquire a new lease until * the current lease period has expired. * * @param string $container name of the container * @param string $blob name of the blob * @param Models\BlobServiceOptions $options optional parameters * * @return BreakLeaseResult * * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee691972.aspx */ public function breakLease($container, $blob, $options = null) { $headers = $this->_putLeaseImpl(LeaseMode::BREAK_ACTION, $container, $blob, null, is_null($options) ? new BlobServiceOptions() : $options); return BreakLeaseResult::create($headers); }