~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to libphutil/src/readableserializer/__tests__/PhutilReadableSerializerTestCase.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-10-23 20:49:26 UTC
  • mfrom: (0.2.1) (0.1.1)
  • Revision ID: package-import@ubuntu.com-20141023204926-vq80u1op4df44azb
Tags: 0~git20141023-1
Initial release (closes: #703046)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
final class PhutilReadableSerializerTestCase extends PhutilTestCase {
 
4
 
 
5
  public function testPrintableValue() {
 
6
    $tests = array(
 
7
      array(null, 'null'),
 
8
      array(true, 'true'),
 
9
      array(false, 'false'),
 
10
      array(0, '0'),
 
11
      array(0.0, '0.0'),
 
12
      array(0.1, '0.1'),
 
13
      array('test', "'test'"),
 
14
    );
 
15
    foreach ($tests as $test) {
 
16
      list($value, $expect) = $test;
 
17
      $this->assertEqual(
 
18
        $expect,
 
19
        PhutilReadableSerializer::printableValue($value));
 
20
    }
 
21
  }
 
22
 
 
23
}