{"action":"created","issue":{"url":"https://api.github.com/repos/concrete5/concrete5/issues/8028","repository_url":"https://api.github.com/repos/concrete5/concrete5","labels_url":"https://api.github.com/repos/concrete5/concrete5/issues/8028/labels{/name}","comments_url":"https://api.github.com/repos/concrete5/concrete5/issues/8028/comments","events_url":"https://api.github.com/repos/concrete5/concrete5/issues/8028/events","html_url":"https://github.com/concrete5/concrete5/pull/8028","id":474324961,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAyMjkxMzQx","number":8028,"title":"Add test for Section::registerDuplicate","user":{"login":"hissy","id":514294,"node_id":"MDQ6VXNlcjUxNDI5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/514294?v=4","gravatar_id":"","url":"https://api.github.com/users/hissy","html_url":"https://github.com/hissy","followers_url":"https://api.github.com/users/hissy/followers","following_url":"https://api.github.com/users/hissy/following{/other_user}","gists_url":"https://api.github.com/users/hissy/gists{/gist_id}","starred_url":"https://api.github.com/users/hissy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hissy/subscriptions","organizations_url":"https://api.github.com/users/hissy/orgs","repos_url":"https://api.github.com/users/hissy/repos","events_url":"https://api.github.com/users/hissy/events{/privacy}","received_events_url":"https://api.github.com/users/hissy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-07-30T01:21:17Z","updated_at":"2019-10-08T03:20:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/concrete5/concrete5/pulls/8028","html_url":"https://github.com/concrete5/concrete5/pull/8028","diff_url":"https://github.com/concrete5/concrete5/pull/8028.diff","patch_url":"https://github.com/concrete5/concrete5/pull/8028.patch"},"body":"Added a new unit test for #8014\r\n\r\nThis test failed before #8014 merged, because a new `mpRelationID` is not generated when the page copied in the same language tree.\r\n\r\n```\r\n$ composer test -- --filter testRegisterDuplicate\r\n> phpunit '--filter' 'testRegisterDuplicate'\r\nPHPUnit 4.8.36 by Sebastian Bergmann and contributors.\r\n\r\nRuntime:        PHP 7.2.20\r\nConfiguration:  /path/to/concrete5/phpunit.xml\r\n\r\nF\r\n\r\nTime: 16.43 seconds, Memory: 38.25MB\r\n\r\nThere was 1 failure:\r\n\r\n1) Concrete\\Tests\\Multilingual\\SectionTest::testRegisterDuplicate\r\nA page duplicated in the same locale, but did not created new mpRelationID.\r\nFailed asserting that '1' is not equal to <string:1>.\r\n\r\n/path/to/concrete5/tests/tests/Multilingual/SectionTest.php:78\r\n\r\nFAILURES!\r\nTests: 1, Assertions: 1, Failures: 1.\r\nScript phpunit handling the test event returned with error code 1\r\n```\r\n\r\nThis test still failed after #8014 merged, due to sql error.\r\n\r\n```\r\n$ composer test -- --filter testRegisterDuplicate\r\n> phpunit '--filter' 'testRegisterDuplicate'\r\nPHPUnit 4.8.36 by Sebastian Bergmann and contributors.\r\n\r\nRuntime:        PHP 7.2.20\r\nConfiguration:  /path/to/concrete5/phpunit.xml\r\n\r\nE\r\n\r\nTime: 8.28 seconds, Memory: 38.25MB\r\n\r\nThere was 1 error:\r\n\r\n1) Concrete\\Tests\\Multilingual\\SectionTest::testRegisterDuplicate\r\nDoctrine\\DBAL\\Exception\\UniqueConstraintViolationException: An exception occurred while executing 'insert into MultilingualPageRelations (mpRelationID, cID, mpLocale, mpLanguage) values (?, ?, ?, ?)' with params [\"2\", 4, \"en_US\", \"en\"]:\r\n\r\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-4' for key 'PRIMARY'\r\n\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:66\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855\r\n/path/to/concrete5/concrete/src/Database/Connection/Connection.php:96\r\n/path/to/concrete5/concrete/src/Multilingual/Page/Section/Section.php:354\r\n/path/to/concrete5/tests/tests/Multilingual/SectionTest.php:72\r\n\r\nCaused by\r\nDoctrine\\DBAL\\Driver\\PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-4' for key 'PRIMARY'\r\n\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:849\r\n/path/to/concrete5/concrete/src/Database/Connection/Connection.php:96\r\n/path/to/concrete5/concrete/src/Multilingual/Page/Section/Section.php:354\r\n/path/to/concrete5/tests/tests/Multilingual/SectionTest.php:72\r\n\r\nCaused by\r\nPDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-4' for key 'PRIMARY'\r\n\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105\r\n/path/to/concrete5/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:849\r\n/path/to/concrete5/concrete/src/Database/Connection/Connection.php:96\r\n/path/to/concrete5/concrete/src/Multilingual/Page/Section/Section.php:354\r\n/path/to/concrete5/tests/tests/Multilingual/SectionTest.php:72\r\n\r\nFAILURES!\r\nTests: 1, Assertions: 0, Errors: 1.\r\nScript phpunit handling the test event returned with error code 2\r\n```"},"comment":{"url":"https://api.github.com/repos/concrete5/concrete5/issues/comments/539296376","html_url":"https://github.com/concrete5/concrete5/pull/8028#issuecomment-539296376","issue_url":"https://api.github.com/repos/concrete5/concrete5/issues/8028","id":539296376,"node_id":"MDEyOklzc3VlQ29tbWVudDUzOTI5NjM3Ng==","user":{"login":"hissy","id":514294,"node_id":"MDQ6VXNlcjUxNDI5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/514294?v=4","gravatar_id":"","url":"https://api.github.com/users/hissy","html_url":"https://github.com/hissy","followers_url":"https://api.github.com/users/hissy/followers","following_url":"https://api.github.com/users/hissy/following{/other_user}","gists_url":"https://api.github.com/users/hissy/gists{/gist_id}","starred_url":"https://api.github.com/users/hissy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hissy/subscriptions","organizations_url":"https://api.github.com/users/hissy/orgs","repos_url":"https://api.github.com/users/hissy/repos","events_url":"https://api.github.com/users/hissy/events{/privacy}","received_events_url":"https://api.github.com/users/hissy/received_events","type":"User","site_admin":false},"created_at":"2019-10-08T03:20:49Z","updated_at":"2019-10-08T03:20:49Z","author_association":"CONTRIBUTOR","body":"@aembler Did you check my test? I think my test is fine. IMO #8014 creates a new bug."}}
{"actor":{"display_login":"hissy"}}