More between points work + mobile UI work:
[bus.git] / spyc / tests / .svn / text-base / IndentTest.php.svn-base
maxious 1 <?php
2
3 require_once ("../spyc.php");
4
5 class IndentTest extends PHPUnit_Framework_TestCase {
6
7 protected $Y;
8
9 protected function setUp() {
10 $this->Y = Spyc::YAMLLoad("indent_1.yaml");
11 }
12
13 public function testIndent_1() {
14 $this->assertEquals (array ('child_1' => 2, 'child_2' => 0, 'child_3' => 1), $this->Y['root']);
15 }
16
17 public function testIndent_2() {
18 $this->assertEquals (array ('child_1' => 1, 'child_2' => 2), $this->Y['root2']);
19 }
20
21 public function testIndent_3() {
22 $this->assertEquals (array (array ('resolutions' => array (1024 => 768, 1920 => 1200), 'producer' => 'Nec')), $this->Y['display']);
23 }
24
25 public function testIndent_4() {
26 $this->assertEquals (array (
27 array ('resolutions' => array (1024 => 768)),
28 array ('resolutions' => array (1920 => 1200)),
29 ), $this->Y['displays']);
30 }
31
32 public function testIndent_5() {
33 $this->assertEquals (array (array (
34 'row' => 0,
35 'col' => 0,
36 'headsets_affected' => array (
37 array (
38 'ports' => array (0),
39 'side' => 'left',
40 )
41 ),
42 'switch_function' => array (
43 'ics_ptt' => true
44 )
45 )), $this->Y['nested_hashes_and_seqs']);
46 }
47
48 public function testIndent_6() {
49 $this->assertEquals (array (
50 'h' => array (
51 array ('a' => 'b', 'a1' => 'b1'),
52 array ('c' => 'd')
53 )
54 ), $this->Y['easier_nest']);
55 }
56
57 }