Esempio n. 1
0
 public function testConvert()
 {
     $this->assertNotEmpty($this->obj->convert(new Hash()));
     $this->assertNotEmpty($this->obj->convert(new Hash(Hash::HASH_TYPE_SHA256, '', '', array('testBool'))));
     $this->assertNotEmpty($this->obj2->convert(new Hash()));
     $this->assertNotEmpty($this->obj2->convert(new Hash(Hash::HASH_TYPE_SHA256, '', '', array('testBool'))));
 }
Esempio n. 2
0
 public function testCircularReferenceGraceful()
 {
     // setup a circular reference
     $this->obj->testEntityMarshal = $this->obj;
     $arr = $this->obj->convert(new PhpArray(true));
     $this->assertArrayHasKey('testEntityMarshal', $arr);
     $this->assertEquals(null, $arr['testEntityMarshal']);
 }
Esempio n. 3
0
 public function testConvert()
 {
     $this->assertNotEmpty($this->obj->convert(new Dump(true)));
     $this->assertNotEmpty($this->obj->convert(new Dump(true, 1)));
     // setup a circular reference
     $this->obj->testEntityMarshal = $this->obj;
     $this->assertNotEmpty($this->obj->convert(new Dump(true)));
 }
Esempio n. 4
0
 public function testIgnoreKeys()
 {
     $result = $this->obj->convert(new QueryString(array('testEntityMarshal')));
     $this->assertNotEmpty($result);
     $this->assertNotContains('testEntityMarshal', $result);
 }
Esempio n. 5
0
 public function testConvert()
 {
     $this->assertNotEmpty($this->obj->convert(new Json()));
 }