public function testIsRequired() { $this->assertSame(false, $this->element->isRequired()); $this->assertSame('', $this->element->getRules()); $this->element->required(true); $this->assertSame(true, $this->element->isRequired()); $this->assertSame('required', $this->element->getRules()); $this->element->required(false); $this->assertSame(false, $this->element->isRequired()); $this->assertSame('', $this->element->getRules()); }