Commit 0523e4b2 authored by Ivo Fokkema's avatar Ivo Fokkema

Fixed import test that is failing.

- When LOVD throws an error because a parent field is linking to itself, then the rest of the checks are not performed anymore.
- Edited the import file to now throw that additional error on a different line, so we're still testing for this check to work.
parent 5da274c3
......@@ -79,8 +79,8 @@ class FalseUpdatetImportTest extends LOVDSeleniumWebdriverBaseTestCase
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 41\): Will not update individual 00000003, too many fields are different from the database \(fatherid, motherid, panelid\)\. There is a maximum of 1 difference to prevent accidental updates\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 41\): Panel ID "00000001" refers to an individual, not a panel \(group of individuals\)\. If you want to configure that individual as a panel, set its [\s\S]Panel size[\s\S] field to a value higher than 1\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 41\): The [\s\S]fatherid[\s\S] can not link to itself; this field is used to indicate which individual in the database is the parent of the given individual\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 41\): The fatherid "00000003" you entered does not refer to a male individual\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 41\): Individual "00000022" does not exist in the database and is not defined \(properly\) in this import file\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 42\): The fatherid "00000003" you entered does not refer to a male individual\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 42\): The motherid "00000002" refers to an panel \(group of individuals\), not an individual\. If you want to configure that panel as an individual, set its [\s\S]Panel size[\s\S] field to value 1\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 43\): This line refers to a non-existing entry\. When the import mode is set to update, no new inserts can be done\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals_To_Diseases, line 49\): This line refers to a non-existing entry\. When the import mode is set to update, no new inserts can be done\.[\s\S]*$/', $bodyText));
......
......@@ -39,7 +39,7 @@
"00000001" "" "" "00000022" "1" "00001" "9" "00001" "2015-06-03 11:30:26" "00001" "2015-06-03 11:30:26" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" ""
"00000002" "" "" "00000002" "11" "00001" "9" "00001" "2015-06-03 11:30:33" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" ""
"00000003" "00000003" "00000022" "00000001" "1" "00001" "9" "00001" "2015-06-03 11:30:41" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "F"
"00000004" "" "00000002" "" "1" "00001" "9" "00001" "2015-06-03 11:30:48" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "M"
"00000004" "00000003" "00000002" "" "1" "00001" "9" "00001" "2015-06-03 11:30:48" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "M"
"00000005" "" "" "00000002" "1" "00001" "9" "00001" "2015-06-03 11:30:41" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "F"
## Individuals_To_Diseases ## Do not remove or alter this header ##
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment