/** * @test */ public function options() { $opts = new Options(); $opts->setQuiet(true)->setVerbose(true); $this->command->setOptions($opts); $actual = $this->command->getOptions(); $this->assertTrue($actual->isQuiet()); $this->assertTrue($actual->isVerbose()); }
/** * @test */ public function settingOptions() { $this->assertFalse($this->opts->isVerbose()); $this->assertFalse($this->opts->isQuiet()); $this->assertFalse($this->opts->hasRelaxedValidation()); $this->assertTrue($this->opts->setQuiet(true)->isQuiet()); $this->assertTrue($this->opts->setVerbose(true)->isVerbose()); $this->assertTrue($this->opts->setRelaxedValidation(true)->hasRelaxedValidation()); $this->assertStringMatchesFormat('-v -q -r', $this->opts->__toString()); }