public function testFrom() { $value = 'box_rox'; $present = Optional::from($value); $this->assertInstanceOf('Bart\\Optional\\Some', $present); $this->assertEquals($value, $present->get()); $this->setExpectedException('Bart\\Exceptions\\IllegalStateException'); Optional::from(null); }