You are here

public function TestBaseTest::providerAssertIdenticalObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/tests/src/Unit/TestBaseTest.php \Drupal\Tests\simpletest\Unit\TestBaseTest::providerAssertIdenticalObject()

Data provider for testAssertIdenticalObject().

File

core/modules/simpletest/tests/src/Unit/TestBaseTest.php, line 375
Contains \Drupal\Tests\simpletest\Unit\TestBaseTest.

Class

TestBaseTest
@coversDefaultClass \Drupal\simpletest\TestBase @group simpletest

Namespace

Drupal\Tests\simpletest\Unit

Code

public function providerAssertIdenticalObject() {
  $obj1 = new \stdClass();
  $obj1->foof = 'yay';
  $obj2 = $obj1;
  $obj3 = clone $obj1;
  $obj4 = new \stdClass();
  return array(
    array(
      TRUE,
      $obj1,
      $obj2,
    ),
    array(
      TRUE,
      $obj1,
      $obj3,
    ),
    array(
      FALSE,
      $obj1,
      $obj4,
    ),
  );
}