/** * @test */ public function fromArrayAddsNewGroups() { $data = array('groups' => array(array('title' => 'foo'))); $this->assertFalse($this->config->issetGroup(sha1('foo'))); $this->config->fromArray($data); $this->assertTrue($this->config->issetGroup(sha1('foo'))); }
/** * @test */ public function postRequestShowWithEmptyStringReturnEmptyArray() { $this->config->expects($this->never())->method('search'); $this->assertEquals(json_encode(array()), $this->controller->parseRequest('POST', array('action' => 'show', 'search' => ''))); }