public function update(){ $input=$this->getInput(); $id = $input['id']; $domain= DomainList::find($input['id']); $domain->update($input); return Redirect::route('domain_list_index'); }
public function testDomainlist() { $list = array('example.com', new Domain('example.net')); $dl = new DomainList($list); $list = $dl->getDomainList(); $this->assertTrue(is_array($list)); $this->assertArrayHasKey(0, $list); $this->assertInstanceOf('SynergyWholesale\\Types\\Domain', $list[0]); $this->assertEquals('example.com', strval($list[0])); $this->assertArrayHasKey(1, $list); $this->assertInstanceOf('SynergyWholesale\\Types\\Domain', $list[1]); $this->assertEquals('example.net', strval($list[1])); $list = $dl->getDomainNames(); $this->assertTrue(is_array($list)); $this->assertArrayHasKey(0, $list); $this->assertTrue(is_string($list[0])); $this->assertEquals('example.com', strval($list[0])); $this->assertArrayHasKey(1, $list); $this->assertTrue(is_string($list[1])); $this->assertEquals('example.net', strval($list[1])); $this->assertEquals('example.com, example.net', strval($dl)); }