当前位置: 首页>>代码示例>>PHP>>正文


PHP Client::getHistory方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Client::getHistory方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getHistory方法的具体用法?PHP Client::getHistory怎么用?PHP Client::getHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Client的用法示例。


在下文中一共展示了Client::getHistory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testUploadThemeNoParentFolder

 /**
  * Test if we can upload a theme with a zip that contains only the files (not wrapped in a parent folder).
  *
  * @return void
  */
 public function testUploadThemeNoParentFolder()
 {
     // Generate zip with no info.xml
     $this->fileName = tempnam(sys_get_temp_dir(), 'Theme');
     $filePath = $this->fileName . '.zip';
     $baseName = self::THEME_NAME;
     $archive = new ZipArchive();
     $archive->open($filePath, ZipArchive::CREATE);
     $archive->addFromString('info.xml', $this->getSampleInfoXmlContents($baseName));
     $archive->close();
     if (file_exists($archive->filename)) {
         throw new FileNotFoundException('Could not create zip file with theme');
     }
     $this->submitThemeUploadForm();
     // We should get a 200 and be redirected to the themes index page.
     self::assertEquals(200, $this->client->getResponse()->getStatusCode());
     self::assertContains(self::URL_THEMES_INDEX, $this->client->getHistory()->current()->getUri());
     self::assertContains(self::THEME_NAME, $this->client->getResponse()->getContent());
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:24,代码来源:UploadThemeTest.php

示例2: runTroughStep5

 /**
  * @param \Symfony\Component\DomCrawler\Crawler $crawler
  * @param \Symfony\Bundle\FrameworkBundle\Client $client
  *
  * @return mixed
  */
 private function runTroughStep5($crawler, $client)
 {
     $form = $crawler->selectButton('Finish installation')->form();
     $client->submit($form, array('install_login[email]' => 'test@test.com', 'install_login[password][first]' => 'password', 'install_login[password][second]' => 'password'));
     $crawler = $client->followRedirect();
     // we should be redirected to step 6
     self::assertEquals(200, $client->getResponse()->getStatusCode());
     self::assertStringEndsWith('/install/6', $client->getHistory()->current()->getUri());
     self::assertGreaterThan(0, $crawler->filter('h2:contains("Installation complete")')->count());
     return $crawler;
 }
开发者ID:forkcms,项目名称:forkcms,代码行数:17,代码来源:InstallerControllerTest.php

示例3: assertIs404

 /**
  * @param Client $client
  */
 protected function assertIs404($client)
 {
     $client->followRedirect();
     $this->assertEquals(404, $client->getResponse()->getStatusCode());
     $this->assertStringEndsWith('404', $client->getHistory()->current()->getUri());
 }
开发者ID:biggtfish,项目名称:forkcms,代码行数:9,代码来源:WebTestCase.php

示例4: assertCurrentRoute

 protected function assertCurrentRoute($route, $param = [])
 {
     $this->assertEquals($this->generateUrl($route, $param), $this->client->getHistory()->current()->getUri());
 }
开发者ID:xtrasmal,项目名称:iinano,代码行数:4,代码来源:WebTestCasePlus.php

示例5: getHistory

 /**
  * Returns the History instance.
  *
  * @return History A History instance
  *
  * @api
  */
 public function getHistory()
 {
     return $this->subject->getHistory();
 }
开发者ID:kleijnweb,项目名称:swagger-bundle,代码行数:11,代码来源:ApiTestClient.php


注:本文中的Symfony\Bundle\FrameworkBundle\Client::getHistory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。