/**
  * Processes the form and shows which values are correct and which are incorrect.
  *
  * Expected GET variables:
  *     - table - name of the table to load
  *
  * Expected POST variables:
  *     - text - the submitted table data
  */
 public function action_create()
 {
     if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
         $this->action_new();
         return;
     }
     $this->table = $this->loadTable($_GET['table']);
     $differ = new Differ();
     $this->diff = $differ->diff($this->table->getText(), $_POST['text']);
     require_once './app/views/table/create.php';
 }
 public function diffLines($expectedLine, $actualLine)
 {
     return parent::diffLines($expectedLine, $actualLine);
 }
Example #3
0
 /**
  * @covers SebastianBergmann\Diff\Differ::diff
  */
 public function testCustomHeader()
 {
     $differ = new Differ('CUSTOM HEADER');
     $this->assertEquals("CUSTOM HEADER@@ @@\n-a\n+b\n", $differ->diff('a', 'b'));
 }