Hey, I hope it is okay to post this here. I'll be interviewed by a few companies in some time and I heard mock interviews are a great way to be prepare for it (the mental aspect :)). So I was wondering if anyone else is the situation and would like to interview with me (mutually). Thanks Hope I didn't violate any forum rules here

Member Avatar
Member Avatar
+0 forum 4

I have an interesting problem and have searched the internet, but haven't yet found an answer. Consider the following function: function get_setting_values_from_file( $parameter ) { exec("/usr/var/binary --options $parameter", $output, $return); $settings = file( $output[0] ); } I need to unit test a similar function. I am currently using phpUnit for my tests and the vfsStream libraries to mock the file system, but how do you mock the binary file available on the system or what is the recommend approach for dealing with test cases like this? All feedback is appreciated.

Member Avatar
Member Avatar
+0 forum 2

I have a method that does not return anything , but it makes a call to another method that returns a value like def apply(): #set some defaults try: script = _getScript() except Exception, ex: raise Exception(ex) node = [xyz for xyz in myLst] # myLst is a global list object hat has values based on different scnarios so how do i test above method using unittest or mox ? any help would be extremely appreciated..

Member Avatar
Member Avatar
+0 forum 3

The End.