Ejemplo n.º 1
0
 def test_string(self):
     string = 'a'
     as_var = php_var_dump('string', string)
Ejemplo n.º 2
0
 def test_def(self):
     """This should fail!"""
     def deffed(): return 1
     self.assertRaises(ValueError, lambda: php_var_dump('deffed', deffed))
Ejemplo n.º 3
0
 def test_lambda(self):
     """This should fail!"""
     lambdad = lambda x: x ** 2
     self.assertRaises(ValueError, lambda: php_var_dump('lambdad', lambdad))
Ejemplo n.º 4
0
 def test_long(self):
     longed = long(1.99123)
     as_var = php_var_dump('longed', longed)
Ejemplo n.º 5
0
 def test_float(self):
     floated = float(2.912)
     as_var = php_var_dump('floated', floated)
Ejemplo n.º 6
0
 def test_none(self):
     none = None
     as_var = php_var_dump('none', none)
Ejemplo n.º 7
0
 def test_bool(self):
     bool = True
     as_var = php_var_dump('bool', bool)
     bool = False
     as_var = php_var_dump('bool', bool)
Ejemplo n.º 8
0
 def test_tuple(self):
     tuple = (1, 2, 3)
     as_var = php_var_dump('tuple', tuple)
Ejemplo n.º 9
0
 def test_dict(self):
     dict = {'a': 1, 'b': 2, 'c': 3, }
     as_var = php_var_dump('dict', dict)
Ejemplo n.º 10
0
 def test_list_of_lists(self):
     list_of_lists = ['a', ['1', '2'], 'b', ['3', '4'], 'c']
     as_var = php_var_dump('list_of_lists', list_of_lists)
Ejemplo n.º 11
0
 def test_list(self):
     list = ['a', 'b']
     as_var = php_var_dump('list', list)
Ejemplo n.º 12
0
 def test_int(self):
     int = 1
     as_var = php_var_dump('int', int)
Ejemplo n.º 13
0
 def test_string_utf8(self):
     string = 'a'
     string = unicode(string, 'utf-8')
     as_var = php_var_dump('string', string)
Ejemplo n.º 14
0
 def test_string_unicode(self):
     string = 'a'
     string = unicode(string)
     as_var = php_var_dump('string', string)