@@ -94,14 +94,16 @@ public function testSave()
94
94
95
95
// create new ones with a different path from existing ones
96
96
97
- $ assetstoreDao1 = $ this ->validSaveTestcase ('test_assetstore_1 ' , '/testassetstore1/path ' , ' 0 ' );
98
- $ assetstoreDao2 = $ this ->validSaveTestcase ('test_assetstore_2 ' , '/testassetstore2/path ' , ' 1 ' );
99
- $ assetstoreDao3 = $ this ->validSaveTestcase ('test_assetstore_3 ' , '/testassetstore3/path ' , ' 2 ' );
97
+ $ assetstoreDao1 = $ this ->validSaveTestcase ('test_assetstore_1 ' , '/testassetstore1/path ' , 0 );
98
+ $ assetstoreDao2 = $ this ->validSaveTestcase ('test_assetstore_2 ' , '/testassetstore2/path ' , 1 );
99
+ $ assetstoreDao3 = $ this ->validSaveTestcase ('test_assetstore_3 ' , '/testassetstore3/path ' , 2 );
100
100
101
101
// make sure one got saved
102
102
$ found = $ this ->Assetstore ->findBy ('name ' , 'test_assetstore_3 ' );
103
103
$ this ->assertNotEmpty ($ found );
104
104
$ savedDao = $ found [0 ];
105
+ // explicit cast to get around differences in mysql vs pgsql type handling
106
+ $ savedDao ->type = (int )$ savedDao ->type ;
105
107
$ this ->assertTrue ($ this ->Assetstore ->compareDao ($ assetstoreDao3 , $ savedDao ));
106
108
107
109
// Incorrect Create Tests
@@ -151,6 +153,8 @@ public function testSave()
151
153
$ found = $ this ->Assetstore ->findBy ('name ' , $ newName );
152
154
$ this ->assertNotEmpty ($ found );
153
155
$ foundDao = $ found [0 ];
156
+ // explicit cast to get around differences in mysql vs pgsql type handling
157
+ $ foundDao ->type = (int )$ foundDao ->type ;
154
158
$ this ->assertTrue ($ this ->Assetstore ->compareDao ($ foundDao , $ assetstoreDao1 ));
155
159
$ this ->assertEquals ($ foundDao ->getName (), $ newName );
156
160
$ assetstoreDao1 ->setName ($ savedName );
@@ -165,6 +169,8 @@ public function testSave()
165
169
$ found = $ this ->Assetstore ->findBy ('path ' , $ newPath );
166
170
$ this ->assertNotEmpty ($ found );
167
171
$ foundDao = $ found [0 ];
172
+ // explicit cast to get around differences in mysql vs pgsql type handling
173
+ $ foundDao ->type = (int )$ foundDao ->type ;
168
174
$ this ->assertTrue ($ this ->Assetstore ->compareDao ($ foundDao , $ assetstoreDao1 ));
169
175
$ this ->assertEquals ($ foundDao ->getPath (), $ newPath );
170
176
$ assetstoreDao1 ->setPath ($ savedPath );
@@ -175,4 +181,4 @@ public function testSave()
175
181
$ this ->Assetstore ->delete ($ assetstoreDao3 );
176
182
}
177
183
178
- }
184
+ }
0 commit comments