protected function Framework_AssertTest::sameValues

2 calls to Framework_AssertTest::sameValues()
Framework_AssertTest::equalProvider in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
Framework_AssertTest::sameProvider in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php

File

drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php, line 563

Class

Framework_AssertTest
@package PHPUnit @author Sebastian Bergmann <sebastian@phpunit.de> @author Bernhard Schussek <bschussek@2bepublished.at> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license …

Code

protected function sameValues() {
  $object = new SampleClass(4, 8, 15);

  // cannot use $filesDirectory, because neither setUp() nor
  // setUpBeforeClass() are executed before the data providers
  $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'foo.xml';
  $resource = fopen($file, 'r');
  return array(
    // NULL
    array(
      NULL,
      NULL,
    ),
    // strings
    array(
      'a',
      'a',
    ),
    // integers
    array(
      0,
      0,
    ),
    // floats
    array(
      2.3,
      2.3,
    ),
    array(
      1 / 3,
      1 - 2 / 3,
    ),
    array(
      log(0),
      log(0),
    ),
    // arrays
    array(
      array(),
      array(),
    ),
    array(
      array(
        0 => 1,
      ),
      array(
        0 => 1,
      ),
    ),
    array(
      array(
        0 => NULL,
      ),
      array(
        0 => NULL,
      ),
    ),
    array(
      array(
        'a',
        'b' => array(
          1,
          2,
        ),
      ),
      array(
        'a',
        'b' => array(
          1,
          2,
        ),
      ),
    ),
    // objects
    array(
      $object,
      $object,
    ),
    // resources
    array(
      $resource,
      $resource,
    ),
  );
}