Verified Commit 4e51c9b5 authored by Dave Long's avatar Dave Long
Browse files

Revert "Issue #3306554 by andypost, mondrake:...

Revert "Issue #3306554 by andypost, mondrake: InvocationMocker::withConsecutive() is deprecated in PHPUnit 9.6 and removed from PHPUnit 10 - easy replacements"

This reverts commit 7d2f5dd1.
parent 7939daf4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ protected function setUp(): void {
  public function testErrorMessagesInline() {
    $this->messenger->expects($this->exactly(4))
      ->method('addError')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['no title given', FALSE],
        ['element is invisible', FALSE],
        ['this missing element is invalid', FALSE],
@@ -164,7 +164,7 @@ public function testErrorMessagesNotInline() {
    // Asserts all messages are summarized.
    $this->messenger->expects($this->exactly(7))
      ->method('addMessage')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['invalid', 'error', FALSE],
        ['invalid', 'error', FALSE],
        ['invalid', 'error', FALSE],
+2 −2
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public function testEnsureTablesNotExist() {
      ]);
    $schema->expects($this->exactly(2))
      ->method('createTable')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['migrate_map_sql_idmap_test', $map_table_schema],
        ['migrate_message_sql_idmap_test', $table_schema],
      );
@@ -153,7 +153,7 @@ public function testEnsureTablesExist() {
      ]);
    $schema->expects($this->exactly(3))
      ->method('addField')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        [
          'migrate_map_sql_idmap_test', 'rollback_action', [
            'type' => 'int',
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public function testComputedConstraintName($table_name, $name, $expected) {

    $this->connection->expects($this->exactly(2))
      ->method('query')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        [$this->anything()],
        ["SELECT 1 FROM pg_constraint WHERE conname = '$expected'"],
      )
+3 −3
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public function testNormalize() {
      ->getMock();
    $serializer->expects($this->exactly(2))
      ->method('normalize')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        [$list_item_1, 'test_format'],
        [$list_item_2, 'test_format'],
      );
@@ -221,7 +221,7 @@ public function testDenormalizeWithValidBundle() {
      ->getMock();
    $serializer->expects($this->exactly(2))
      ->method('denormalize')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['value_1', get_class($key_1), NULL, ['target_instance' => $key_1, 'entity_type' => 'test']],
        ['value_2', get_class($key_2), NULL, ['target_instance' => $key_2, 'entity_type' => 'test']],
      );
@@ -370,7 +370,7 @@ public function testDenormalizeWithNoBundle() {
      ->getMock();
    $serializer->expects($this->exactly(2))
      ->method('denormalize')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['value_1', get_class($key_1), NULL, ['target_instance' => $key_1, 'entity_type' => 'test']],
        ['value_2', get_class($key_2), NULL, ['target_instance' => $key_2, 'entity_type' => 'test']],
      );
+2 −2
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ public function testCacheCallsWithSameTableMultipleTimes() {
      );
    $this->cacheBackend->expects($this->exactly(2))
      ->method('set')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ['views_data:en', $expected_views_data],
        ['views_data:views_test_data:en', $expected_views_data['views_test_data']],
      );
@@ -600,7 +600,7 @@ public function testCacheCallsWithoutWarmCacheAndGetMultipleTables() {
      );
    $this->cacheBackend->expects($this->exactly(2))
      ->method('set')
      ->willReturnOnConsecutiveCalls(
      ->withConsecutive(
        ["views_data:$table_name:en", $expected_views_data[$table_name]],
        ["views_data:$table_name_2:en", $expected_views_data[$table_name_2]],
      );
Loading