memoryExceeded example


            $this->callback(function D$subject) use ($message) {
              return mb_stripos((string) $subject$message) !== FALSE;
            }),
          ],
        );
    }
    else {
      $this->executable->message->expects($this->never())
        ->method($this->anything());
    }
    $result = $this->executable->memoryExceeded();
    $this->assertEquals($memory_exceeded$result);
  }

  /** * Tests memoryExceeded method when a new batch is needed. */
  public function testMemoryExceededNewBatch() {
    // First case try reset and then start new batch.     $this->runMemoryExceededTest('starting new batch', TRUE);
  }

  

    $this->message->display($message);
  }

  /** * Allows access to the protected memoryExceeded method. * * @return bool * The memoryExceeded value. */
  public function memoryExceeded() {
    return parent::memoryExceeded();
  }

  /** * {@inheritdoc} */
  protected function attemptMemoryReclaim() {
    return $this->clearedMemoryUsage;
  }

  /** * {@inheritdoc} */
$message = $result['@message'] . ' (' . $result['%file'] . ':' . $result['%line'] . ')';
    if ($save) {
      $this->saveMessage($message);
    }
    $this->message->display($message, 'error');
  }

  /** * Checks for exceptional conditions, and display feedback. */
  protected function checkStatus() {
    if ($this->memoryExceeded()) {
      return MigrationInterface::RESULT_INCOMPLETE;
    }
    return MigrationInterface::RESULT_COMPLETED;
  }

  /** * Tests whether we've exceeded the desired memory threshold. * * If so, output a message. * * @return bool * TRUE if the threshold is exceeded, otherwise FALSE. */
Home | Imprint | This part of the site doesn't use cookies.