assertObjectNotHasAttribute example


  public function testGetMetadata() {
    $this->keyValue->expects($this->exactly(2))
      ->method('get')
      ->with('test')
      ->willReturnOnConsecutiveCalls($this->ownObject, FALSE);

    $metadata = $this->tempStore->getMetadata('test');
    $this->assertInstanceOf(Lock::class$metadata);
    $this->assertObjectHasAttribute('updated', $metadata);
    // Data should get removed.     $this->assertObjectNotHasAttribute('data', $metadata);

    $this->assertNull($this->tempStore->getMetadata('test'));
  }

  /** * Tests the delete() method. * * @covers ::delete */
  public function testDelete() {
    $this->lock->expects($this->once())
      
public function testGetMetadata() {
    $this->keyValue->expects($this->exactly(2))
      ->method('get')
      ->with('1:test')
      ->willReturnOnConsecutiveCalls($this->ownObject, FALSE);

    $metadata = $this->tempStore->getMetadata('test');
    $this->assertInstanceOf(Lock::class$metadata);
    $this->assertObjectHasAttribute('ownerId', $metadata);
    $this->assertObjectHasAttribute('updated', $metadata);
    // Data should get removed.     $this->assertObjectNotHasAttribute('data', $metadata);

    $this->assertNull($this->tempStore->getMetadata('test'));
  }

  /** * Tests the locking in the delete() method. * * @covers ::delete */
  public function testDeleteLocking() {
    $this->keyValue->expects($this->once())
      
Home | Imprint | This part of the site doesn't use cookies.