Re: [fw-general] Zend_Test_PHPUnit_ControllerTestCase: asserting a checkbox is checked
I confirm I had similar problems with css selectors. I didn't discover it deeply though, but used xpath assertion instead which worked as expected. m. On Tue, Apr 27, 2010 at 11:04 PM, Núria nuq...@gmail.com wrote: I'm afraid this is a bug. CSS selectors are converted to XPath queries before the evaluation, and apparently there is something wrong with that conversion. In this case, the expression: #person_acti...@checked=checked] is transformed to the XPath query: //*...@id='person_active'][checked=checked] The problem here is that the @ before the attribute checked is missing, therefore it fails to match any element. This workaround will get the job done (although it's not a valid selector): $this-assertQuery('#person_acti...@checked=checked]'); or you can use the assertXpath() method instead. -- Núria 2010/4/27 David Mintz da...@davidmintz.org I am having some trouble figuring out the magic words. My response body contains this: input type=checkbox name=person[active] id=person_active value=1 checked=checked / In the controller test, I when I say $this-assertQuery('#person_active'); the assertion succeeds, but $this-assertQuery('#person_active[checked=checked]'); fails with 'Failed asserting node DENOTED BY #person_active[checked=checked] EXISTS.' After diddling around with several variations, the only thing that works for me is to assert that the containing element contains a checkbox whose checked attribute is checked: $this-assertQuery('#person_active-element input[checked=checked]') ; It might be worth noting that the jQuery snippet $('#person_active[checked=checked]').length == 1 typed into the Firebug console evaluates to true. So it looks like my CSS is kosher. Any ideas? Thanks. -- Support real health care reform: http://phimg.org/ -- David Mintz http://davidmintz.org/
[fw-general] Zend Framework 1.10.4 Released
On behalf of the Zend Framework community, I'm pleased to announce the immediate availability of Zend Framework 1.10.4, our fourth maintenance release in the 1.10 series. You can download it from our downloads page: http://framework.zend.com/download/latest This release includes approximately 50 bugfixes, the majority of which were contributed during our Bug Hunt Days two weeks ago. The fixes contributed help stabilize and improve the 1.10 series. Three fixes in particular are worth noting: * ZF-7493: an important serialization improvement in Zend_Amf that has been benchmarked as providing 200-300% faster serialization of large datasets. * ZF-9263: a fix to Zend_Loader::isReadable() to fix a regression found on Windows platforms. This fix should eliminate most if not all raised warnings that occurred during resource and plugin loading. * ZF-9504: a patch was applied to Zend_XmlRpc_Value to make value generation more efficient. Benchmarks and profiling show enormous changes on large datasets: in one example, memory usage drops from 1GB to 20MB, while dropping from execution times of 60s to around 10s. We'd like to thank everyone who committed time, code, and translations since the 1.10.3 release -- the community has been quite productive! -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
[fw-general] Session Db trouble with ajax request without event handleri
Hi, Sorry to bother you but I've a very strange behaviour using session Db. If I make a ajax request without a event handler the sessions Db doesn't work (if I'm login the script log me out). while if I use the standard session (file) the script works fine. $(function() { //$(#dataWrapper).tablesorter(); tvnVideoApp.resetServerPaginator(); /* with the line below if I've set up the session Db the script doesn't work */ tvnVideoApp.sendRequest(1); $('#pagination ul li a').click(function(){ /* No problem with this */ tvnVideoApp.sendRequest(2); return false; }); }); Could you help me,please ? -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Session-Db-trouble-with-ajax-request-without-event-handleri-tp2073591p2073591.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Session Db trouble with ajax request without event handleri
What is tvnVideoApp.sendRequest(1);? Are you using jQuery's built-in $.ajax() to initiate ajax requests? -- Hector On Wed, Apr 28, 2010 at 9:52 AM, whisher whis...@mp4.it wrote: tvnVideoApp.sendRequest(1);
[fw-general] Re: Session Db trouble with ajax request without event handleri
Yes, I'm using Jquery. Like tvnVideoApp.sendRequest = function(page) { $.ajax({ type: POST, timeout:3000, url: sBasePath + '/admin/video/listxhr' , cache: false, dataType: 'html', data: {'page':page} , success: function(data){ $(#dataWrapper tbody).html(data); alert(data); }, error:function(xhr, str, er){ alert('error'); return; } }); } Thanks for the quick reply :) -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Session-Db-trouble-with-ajax-request-tp2073591p2073605.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Re: Session Db trouble with ajax request without event handleri
That seems fine to me. So if you change the session storage from Db to File, it works? Are any other settings changed? -- Hector On Wed, Apr 28, 2010 at 10:00 AM, whisher whis...@mp4.it wrote: Yes, I'm using Jquery. Like tvnVideoApp.sendRequest = function(page) { $.ajax({ type: POST, timeout:3000, url: sBasePath + '/admin/video/listxhr' , cache: false, dataType: 'html', data: {'page':page} , success: function(data){ $(#dataWrapper tbody).html(data); alert(data); }, error:function(xhr, str, er){ alert('error'); return; } }); } Thanks for the quick reply :) -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Session-Db-trouble-with-ajax-request-tp2073591p2073605.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Validate_CreditCard and Authorize.Net's Sandbox API
DISCLAIMER: my advice is not necessarily relevant to Zend_Validate_CrediCard. There's a universal test CC num of - not sure if that is going to work in your case but technically that should validate... I think it is a visa, though... Rob On Wed, Apr 28, 2010 at 5:29 PM, Bradley Holt bradley.h...@foundline.comwrote: Has anyone else tried to use Zend_Validate_CreditCard with Authorize.Net's sandbox API? I've run into a problem that is making it difficult for me to test my application. The test credit card number that Authorize.Net provides for their sandbox API (4) is not a valid credit card number--at least according to Zend_Validate_CreditCard. It appears that Zend_Validate_CreditCard thinks this is a Visa credit card (since it starts with a '4') and that Visa credit cards should have a length of 16 characters but Authorize.Net's test credit card has a length of 13 characters, causing it to fail validation. Has anyone either found other, valid, test credit numbers that work in Authorize.Net's sandbox API or found a simple way to get Zend_Validate_CreditCard to accept this as a valid credit card (at least in testing)? -- Bradley Holt bradley.h...@foundline.com
Re: [fw-general] Zend_Validate_CreditCard and Authorize.Net's Sandbox API
On Wed, Apr 28, 2010 at 5:41 PM, Rob Riggen r...@riggen.org wrote: DISCLAIMER: my advice is not necessarily relevant to Zend_Validate_CrediCard. There's a universal test CC num of - not sure if that is going to work in your case but technically that should validate... I think it is a visa, though... Thanks, Rob! That universal test credit card number seemed to make both Zend_Validate_CreditCard and Authorize.Net's sandbox API happy. I hope it wasn't your credit card number ;-) Rob On Wed, Apr 28, 2010 at 5:29 PM, Bradley Holt bradley.h...@foundline.comwrote: Has anyone else tried to use Zend_Validate_CreditCard with Authorize.Net's sandbox API? I've run into a problem that is making it difficult for me to test my application. The test credit card number that Authorize.Net provides for their sandbox API (4) is not a valid credit card number--at least according to Zend_Validate_CreditCard. It appears that Zend_Validate_CreditCard thinks this is a Visa credit card (since it starts with a '4') and that Visa credit cards should have a length of 16 characters but Authorize.Net's test credit card has a length of 13 characters, causing it to fail validation. Has anyone either found other, valid, test credit numbers that work in Authorize.Net's sandbox API or found a simple way to get Zend_Validate_CreditCard to accept this as a valid credit card (at least in testing)? -- Bradley Holt bradley.h...@foundline.com -- Bradley Holt bradley.h...@foundline.com
[fw-general] Re: Problems autoloading modules on shared hosting
The solution was so simple! The bootstrap.php file in each of my module root directories started with a lowercase b instead of B. Zend_Application_Resource_Modules is hardcoded to look for /modulepath/Bootstrap.php. Now my modules are loading perfectly. It took so long to figure out because I was setting the bootstrap filename for the default module specifically with a lower case b in the config ini. The other thing I fixed was moving the main bootstrap from being directly under my application directory into the root of my default module. I removed the extra autoload function from my Module_Bootstrap since I was getting duplicate autoloader instances for my module. The default module still needed to by autoloaded even though it was under the module directory. I hope this helps others to avoid lost days and lost hair. Shaun -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Problems-autoloading-modules-on-shared-hosting-tp2063729p2074885.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Validate_CreditCard and Authorize.Net's Sandbox API
For others interested, below should be a more complete list of testing cc numbers for various providers: $_ccNums = array( // american express 'ae' = array('378282246310005', '371449635398431'), // american express corporate 'aec' = array('378734493671000'), // diners club 'dc' = array('30569309025904', '3852023237'), // discover 'dcv' = array('6017', '6011000990139424'), // jcb 'jcb' = array('35301110', '3566002020360505'), // Master Card 'mc' = array('', '5105105105105100'), // Visa 'visa' = array('4111', '40121881', '4'), ); Regards, M. On Thu, Apr 29, 2010 at 12:09 AM, Bradley Holt bradley.h...@foundline.com wrote: On Wed, Apr 28, 2010 at 5:41 PM, Rob Riggen r...@riggen.org wrote: DISCLAIMER: my advice is not necessarily relevant to Zend_Validate_CrediCard. There's a universal test CC num of - not sure if that is going to work in your case but technically that should validate... I think it is a visa, though... Thanks, Rob! That universal test credit card number seemed to make both Zend_Validate_CreditCard and Authorize.Net's sandbox API happy. I hope it wasn't your credit card number ;-) Rob On Wed, Apr 28, 2010 at 5:29 PM, Bradley Holt bradley.h...@foundline.com wrote: Has anyone else tried to use Zend_Validate_CreditCard with Authorize.Net's sandbox API? I've run into a problem that is making it difficult for me to test my application. The test credit card number that Authorize.Net provides for their sandbox API (4) is not a valid credit card number--at least according to Zend_Validate_CreditCard. It appears that Zend_Validate_CreditCard thinks this is a Visa credit card (since it starts with a '4') and that Visa credit cards should have a length of 16 characters but Authorize.Net's test credit card has a length of 13 characters, causing it to fail validation. Has anyone either found other, valid, test credit numbers that work in Authorize.Net's sandbox API or found a simple way to get Zend_Validate_CreditCard to accept this as a valid credit card (at least in testing)? -- Bradley Holt bradley.h...@foundline.com -- Bradley Holt bradley.h...@foundline.com