/** * Test that the needed requirements are met */ public function testOptionRequirementsMet() { $option = new Option('f'); $option->setNeeds('foo'); $optionSet = array('foo' => new Option('foo')); $this->assertTrue($option->hasNeeds($optionSet)); }
/** * Test hasNeeds when requirements are not met. * @test */ public function testOptionRequiresNotMet() { $option = new Option('f'); $option->setNeeds('foo'); $optionSet = array('foo' => new Option('foo')); $expected = array('foo'); $this->assertEquals($expected, $option->hasNeeds($optionSet)); }