コード例 #1
0
ファイル: BasicTest.php プロジェクト: sp-ruben-simon/daff-php
 public function testNestedOutput()
 {
     $table1 = harness_Native::table($this->data1);
     $table2 = harness_Native::table($this->data2);
     $alignment = coopy_Coopy::compareTables($table1, $table2, null)->align();
     $data_diff = new _hx_array(array());
     $table_diff = harness_Native::table($data_diff);
     $flags = new coopy_CompareFlags();
     $flags->allow_nested_cells = true;
     $highlighter = new coopy_TableDiff($alignment, $flags);
     $highlighter->hilite($table_diff);
     $update = $table_diff->getCell(3, 4);
     $view = $table_diff->getCellView();
     $this->assertTrue($view->isHash($update), _hx_anonymous(array("fileName" => "BasicTest.hx", "lineNumber" => 96, "className" => "harness.BasicTest", "methodName" => "testNestedOutput")));
     $this->assertEquals("Barcelona", $view->hashGet($update, "before"), _hx_anonymous(array("fileName" => "BasicTest.hx", "lineNumber" => 97, "className" => "harness.BasicTest", "methodName" => "testNestedOutput")));
     $this->assertEquals("Madrid", $view->hashGet($update, "after"), _hx_anonymous(array("fileName" => "BasicTest.hx", "lineNumber" => 98, "className" => "harness.BasicTest", "methodName" => "testNestedOutput")));
     $this->assertEquals("Barcelona", harness_Native::getHashKey($update, "before"), _hx_anonymous(array("fileName" => "BasicTest.hx", "lineNumber" => 99, "className" => "harness.BasicTest", "methodName" => "testNestedOutput")));
     $this->assertEquals("Madrid", harness_Native::getHashKey($update, "after"), _hx_anonymous(array("fileName" => "BasicTest.hx", "lineNumber" => 100, "className" => "harness.BasicTest", "methodName" => "testNestedOutput")));
 }