/** * Returns an instance that contains no references * @return None */ public static function absent() { return None::instance(); }
public function testEquals() { $absent = None::instance(); $this->assertFalse($absent->equals(new Some('foo'))); $this->assertTrue($absent->equals($absent)); }
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())); }