public function testDefault() { $valuePickerFeature = new ValuePickerFeature(); $this->assertNull($valuePickerFeature->getDefault()); $this->assertSame($valuePickerFeature, $valuePickerFeature->addValue("value1")); $this->assertEquals(array("value1"), $valuePickerFeature->getValues()); $this->assertEquals("value1", $valuePickerFeature->getDefault()); $this->assertSame($valuePickerFeature, $valuePickerFeature->setDefault("value2")); $this->assertEquals(array("value1", "value2"), $valuePickerFeature->getValues()); $this->assertEquals("value2", $valuePickerFeature->getDefault()); $this->assertSame($valuePickerFeature, $valuePickerFeature->addValue("value3")); $this->assertSame($valuePickerFeature, $valuePickerFeature->setDefault("value3")); $this->assertEquals(array("value1", "value2", "value3"), $valuePickerFeature->getValues()); $this->assertEquals("value3", $valuePickerFeature->getDefault()); $this->assertSame($valuePickerFeature, $valuePickerFeature->setDefault(null)); $this->assertEquals(array("value1", "value2", "value3"), $valuePickerFeature->getValues()); $this->assertEquals("value1", $valuePickerFeature->getDefault()); }
/** * @see ScriptFeatureable::getScriptFeatures() */ public function getScriptFeatures() { return ScriptFeature::collect($this->feature, $this->getLabel(), $this->feature->getEntry()); }