Beispiel #1
0
 /**
  * This method tests the "nvl" method.
  */
 public function test_nvl()
 {
     $x = IChar\Type::box('x');
     $y = IChar\Type::box('y');
     $z = IChar\Module::nvl($x, $y);
     $this->assertInstanceOf('\\Saber\\Data\\IChar\\Type', $z);
     $this->assertSame('x', $z->unbox());
     $z = IChar\Module::nvl(null, $x);
     $this->assertInstanceOf('\\Saber\\Data\\IChar\\Type', $z);
     $this->assertSame('x', $z->unbox());
     $z = IChar\Module::nvl(null, null);
     $this->assertInstanceOf('\\Saber\\Data\\IChar\\Type', $z);
     $this->assertSame(chr(0), $z->unbox());
 }