ZF-2785: Zend_Gdata tests produce errors
Description
SVN r8517 of the tests in the trunk produce the following errors on WinXP, PHP 5.1.4, PHPUnit 3.2.15:
100) testGetVideoId(Zend_Gdata_YouTube_VideoEntryTest) strrpos() expects parameter 1 to be string, object given c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\library\Zend\Gdata\YouTube\VideoEntry.php :442 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:133 101) testGetVideoIdException(Zend_Gdata_YouTube_VideoEntryTest) strrpos() expects parameter 1 to be string, object given c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\library\Zend\Gdata\YouTube\VideoEntry.php :442 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:142 102) testSamplePropertiesAreCorrect(Zend_Gdata_YouTube_VideoEntryTest) strrpos() expects parameter 1 to be string, object given c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\library\Zend\Gdata\YouTube\VideoEntry.php :442 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:48 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:177 103) testGetVideoTags(Zend_Gdata_YouTube_VideoEntryTest) Object of class Zend_Gdata_Media_Extension_MediaKeywords to string conversion c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:234 104) testGetVideoGeoLocation(Zend_Gdata_YouTube_VideoEntryTest) Object of class Zend_Gdata_Geo_Extension_GmlPos to string conversion c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\library\Zend\Gdata\YouTube\VideoEntry.php :640 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:281 105) testConvertVideoEntryToAndFromString(Zend_Gdata_YouTube_VideoEntryTest) strrpos() expects parameter 1 to be string, object given c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\library\Zend\Gdata\YouTube\VideoEntry.php :442 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:48 c:\Documents and Settings\dfelton\My Documents\SVN Remote\Zend Framework\trunk\tests\Zend\Gdata\YouTube\VideoEntryTest.p hp:316
Comments
Posted by Ryan Boyd (rboyd) on 2008-03-03T20:00:07.000+0000
Fixed in trunk r8526.
Zend_Gdata_YouTube_VideoEntry::getVideoId was passing a Zend_Gdata_App_Extension_Id object to strrpos instead of passing a string. Under PHP 5.2.0+ this is valid -- as the__toString method will be called. However, prior to 5.2.0, this is invalid and produces the error Darby mentions in his note.
Darby - can you please review this change and I'll merge it to the 1.5 branch.
Thanks, -Ryan
Posted by Darby Felton (darby) on 2008-03-04T12:51:06.000+0000
Now I get the following 2 errors:
Posted by Darby Felton (darby) on 2008-03-06T16:13:24.000+0000
Resolved with SVN 8607.
Posted by Darby Felton (darby) on 2008-03-06T16:20:16.000+0000
Resolved for 1.5.0RC2 with SVN 8610.