/** * remove * * @param string $host site host * * @return void */ public function remove($host) { $site = $this->repository->find($host); $this->repository->delete($site); }
/** * testDeleteOneAliasRoute * * @return void */ public function testDeleteOneAliasRoute() { $repo = new SiteRepository($this->conn); $query = $this->query; $query->shouldReceive('where')->andReturn($query); $query->shouldReceive('delete')->andReturn(1); $site = new Site(['host' => 'test.com', 'siteKey' => 'test']); $affected = $repo->delete($site); $this->assertEquals(1, $affected); }