Example #1
0
 /**
  * Returns an instance that contains no references
  * @return None
  */
 public static function absent()
 {
     return None::instance();
 }
Example #2
0
 public function testEquals()
 {
     $absent = None::instance();
     $this->assertFalse($absent->equals(new Some('foo')));
     $this->assertTrue($absent->equals($absent));
 }
Example #3
0
 public function testEquals()
 {
     $present = $this->getPresent();
     $this->assertTrue($present->equals(new Some($this->value)));
     $this->assertFalse($present->equals(new Some('some other value')));
     $this->assertFalse($present->equals(None::instance()));
 }