Beispiel #1
0
 def convertphp(self, phpsource):
     """call the convertphp, return the outputfile"""
     inputfile = wStringIO.StringIO(phpsource)
     outputfile = wStringIO.StringIO()
     templatefile = None
     assert php2po.convertphp(inputfile, outputfile, templatefile)
     return outputfile.getvalue()
Beispiel #2
0
 def convertphp(self, phpsource):
     """call the convertphp, return the outputfile"""
     inputfile = wStringIO.StringIO(phpsource)
     outputfile = wStringIO.StringIO()
     templatefile = None
     assert php2po.convertphp(inputfile, outputfile, templatefile)
     return outputfile.getvalue()
Beispiel #3
0
 def convertphp(self, phpsource, template=None, expected=1):
     """call the convertphp, return the outputfile"""
     inputfile = wStringIO.StringIO(phpsource)
     outputfile = wStringIO.StringIO()
     templatefile = None
     if template:
         templatefile = wStringIO.StringIO(template)
     assert php2po.convertphp(inputfile, outputfile,
                              templatefile) == expected
     return outputfile.getvalue()