Beispiel #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'))));
 }
Beispiel #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']);
 }
Beispiel #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)));
 }
Beispiel #4
0
 public function testIgnoreKeys()
 {
     $result = $this->obj->convert(new QueryString(array('testEntityMarshal')));
     $this->assertNotEmpty($result);
     $this->assertNotContains('testEntityMarshal', $result);
 }
Beispiel #5
0
 public function testConvert()
 {
     $this->assertNotEmpty($this->obj->convert(new Json()));
 }