You are here

public function ExporterTest::shortenedExportProvider in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/sebastian/exporter/tests/ExporterTest.php \SebastianBergmann\Exporter\ExporterTest::shortenedExportProvider()

File

vendor/sebastian/exporter/tests/ExporterTest.php, line 267

Class

ExporterTest
@covers SebastianBergmann\Exporter\Exporter

Namespace

SebastianBergmann\Exporter

Code

public function shortenedExportProvider() {
  $obj = new \stdClass();
  $obj->foo = 'bar';
  $array = array(
    'foo' => 'bar',
  );
  return array(
    array(
      null,
      'null',
    ),
    array(
      true,
      'true',
    ),
    array(
      1,
      '1',
    ),
    array(
      1.0,
      '1.0',
    ),
    array(
      1.2,
      '1.2',
    ),
    array(
      '1',
      "'1'",
    ),
    // \n\r and \r is converted to \n
    array(
      "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext",
      "'this\\nis\\na\\nvery\\nvery\\nvery\\nvery...g\\ntext'",
    ),
    array(
      new \stdClass(),
      'stdClass Object ()',
    ),
    array(
      $obj,
      'stdClass Object (...)',
    ),
    array(
      array(),
      'Array ()',
    ),
    array(
      $array,
      'Array (...)',
    ),
  );
}