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'))));
 }
 public function testDoesContainNullValues()
 {
     $ent1 = new TestNamedEntity();
     $ent1->setId(1);
     $ent1->name = "test1";
     $this->assertFalse($ent1->doesContainNullValues());
     $ent2 = new TestNamedEntity();
     $ent2->setId(2);
     $ent2->name = null;
     $this->assertTrue($ent2->doesContainNullValues());
     $ent3 = new EmptyEntity();
     // id is not set, should also be null
     $this->assertTrue($ent3->doesContainNullValues());
 }