/** * @covers ::open * @covers ::getZip * @covers ::getRoot * @covers ::getPromptNames */ public function testOpen() { $client = new ClientMock(); $client->queueResponse('test.zip'); $template = new Template($client); $template->open('TEST_URL'); $history = $client->getHistory(); $this->assertEquals('TEST_URL', (string) $history[0]['request']->getUri()); $zip = $template->getZip(); $this->assertInstanceOf('ZipArchive', $zip); $this->assertEquals('clippings-package-template-971a36f/', $template->getRoot()); $this->assertEquals(['title', 'description'], $template->getPromptNames()); }