{"action":"closed","issue":{"url":"https://api.github.com/repos/sebastianbergmann/dbunit/issues/16","repository_url":"https://api.github.com/repos/sebastianbergmann/dbunit","labels_url":"https://api.github.com/repos/sebastianbergmann/dbunit/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/sebastianbergmann/dbunit/issues/16/comments","events_url":"https://api.github.com/repos/sebastianbergmann/dbunit/issues/16/events","html_url":"https://github.com/sebastianbergmann/dbunit/issues/16","id":378964,"number":16,"title":"assertTablesEqual() relies on records' order.","user":{"login":"marcenuc","id":5284,"avatar_url":"https://avatars1.githubusercontent.com/u/5284?v=4","gravatar_id":"","url":"https://api.github.com/users/marcenuc","html_url":"https://github.com/marcenuc","followers_url":"https://api.github.com/users/marcenuc/followers","following_url":"https://api.github.com/users/marcenuc/following{/other_user}","gists_url":"https://api.github.com/users/marcenuc/gists{/gist_id}","starred_url":"https://api.github.com/users/marcenuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcenuc/subscriptions","organizations_url":"https://api.github.com/users/marcenuc/orgs","repos_url":"https://api.github.com/users/marcenuc/repos","events_url":"https://api.github.com/users/marcenuc/events{/privacy}","received_events_url":"https://api.github.com/users/marcenuc/received_events","type":"User","site_admin":false},"labels":[{"id":33756,"url":"https://api.github.com/repos/sebastianbergmann/dbunit/labels/bug","name":"bug","color":"ff0000","default":true},{"id":904747792,"url":"https://api.github.com/repos/sebastianbergmann/dbunit/labels/stale","name":"stale","color":"000000","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2010-10-24T08:05:01Z","updated_at":"2018-04-25T10:16:42Z","closed_at":"2018-04-25T10:16:42Z","author_association":"NONE","body":"Using PHPUnit-3.5.0 and PHP-5.3.3 on Ubuntu 10.10. Not tested with other versions.\n\nThe following test should not fail because it compares a dataset to itself.\n\nHere is DatabaseTest.php:\n\n```\n<?php\nrequire_once 'PHPUnit/Extensions/Database/TestCase.php';\nrequire_once 'PHPUnit/Extensions/Database/DataSet/XmlDataSet.php';\n\nclass DatabaseTest extends PHPUnit_Extensions_Database_TestCase\n{\n  protected function getConnection()\n  {\n    $pdo = new PDO('sqlite:db/negozi.db');\n    return $this->createDefaultDBConnection($pdo, 'negozi');\n  }\n\n  protected function getDataSet()\n  {\n    return $this->createXMLDataSet(dirname(__FILE__).'/dati-iniziali.xml');\n  }\n\n  public function testTableNazione() {\n    $set = $this->createXMLDataSet(dirname(__FILE__).'/dati-iniziali.xml');\n\n    $this->assertTablesEqual(\n      $set->getTable('NAZIONE'),\n      $this->getConnection()\n           ->createDataSet()\n           ->getTable('NAZIONE')\n    );\n  }\n}\n?>\n```\n\nHere is dati-iniziali.xml:\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE dataset SYSTEM \"dataset.dtd\">\n<dataset>\n  <table name=\"NAZIONE\">\n    <column>CODICE_ISO</column>\n    <column>NOME</column>\n    <row>\n      <value>IT</value>\n      <value>Italia</value>\n    </row>\n    <row>\n      <value>FR</value>\n      <value>Francia</value>\n    </row>\n    <row>\n      <value>SP</value>\n      <value>Spagna</value>\n    </row>\n  </table>\n</dataset>\n```\n\nThe output of phpunit DatabaseTest.php is:\n\n```\nPHPUnit 3.5.0 by Sebastian Bergmann.\n\nF\n\nTime: 1 second, Memory: 3.75Mb\n\nThere was 1 failure:\n\n1) DatabaseTest::testNuovoCliente\nFailed asserting that actual \n+----------------------+----------------------+\n| NAZIONE                                     |\n+----------------------+----------------------+\n|      CODICE_ISO      |         NOME         |\n+----------------------+----------------------+\n|          FR          |       Francia        |\n+----------------------+----------------------+\n|          IT          |        Italia        |\n+----------------------+----------------------+\n|          SP          |        Spagna        |\n+----------------------+----------------------+\n\n is equal to expected \nPHPUnit_Extensions_Database_DataSet_DefaultTable Object\n(\n    [tableMetaData:protected] => PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData Object\n        (\n            [columns:protected] => Array\n                (\n                    [0] => CODICE_ISO\n                    [1] => NOME\n                )\n\n            [primaryKeys:protected] => Array\n                (\n                )\n\n            [tableName:protected] => NAZIONE\n        )\n\n    [data:protected] => Array\n        (\n            [0] => Array\n                (\n                    [CODICE_ISO] => IT\n                    [NOME] => Italia\n                )\n\n            [1] => Array\n                (\n                    [CODICE_ISO] => FR\n                    [NOME] => Francia\n                )\n\n            [2] => Array\n                (\n                    [CODICE_ISO] => SP\n                    [NOME] => Spagna\n                )\n\n        )\n\n)\n Reason: Expected value of IT for row 0 column CODICE_ISO, has a value of FR\n\n/home/marcenuc/Tailor/workspace-php/ConfezioniSposo/remote/lib/DatabaseTest.php:26\n\nFAILURES!\nTests: 1, Assertions: 1, Failures: 1.\n```\n"}}
{"actor":{"display_login":"stale"}}