Пример #1
0
 protected function setUp()
 {
     parent::setUp();
     $this->localDriver = $this->getMock('VIPSoft\\CodeCoverageCommon\\Driver\\Stub');
     $this->remoteDriver = $this->getMockBuilder('VIPSoft\\CodeCoverageExtension\\Driver\\RemoteXdebug')->disableOriginalConstructor()->getMock();
     $this->driver = new Proxy();
     $this->driver->addDriver($this->localDriver);
     $this->driver->addDriver($this->remoteDriver);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->config = array('base_url' => 'http://localhost', 'auth' => array('user' => 'user name', 'password' => 'password'), 'create' => array('method' => 'POST', 'path' => '/'), 'read' => array('method' => 'GET', 'path' => '/'), 'delete' => array('method' => 'DELETE', 'path' => '/'));
     $this->response = $this->getMockBuilder('Guzzle\\Http\\Message\\Response')->disableOriginalConstructor()->getMock();
     $request = $this->getMockBuilder('Guzzle\\Http\\Message\\Request')->disableOriginalConstructor()->getMock();
     $request->expects($this->any())->method('send')->will($this->returnValue($this->response));
     $this->client = $this->getMock('Guzzle\\Http\\Client');
     $this->client->expects($this->any())->method('post')->will($this->returnValue($request));
     $this->client->expects($this->any())->method('put')->will($this->returnValue($request));
     $this->client->expects($this->any())->method('get')->will($this->returnValue($request));
     $this->client->expects($this->any())->method('delete')->will($this->returnValue($request));
 }
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->coverage = $this->getMock('PHP_CodeCoverage');
     $this->service = $this->getMockBuilder('VIPSoft\\CodeCoverageExtension\\Service\\ReportService')->disableOriginalConstructor()->getMock();
 }
 protected function tearDown()
 {
     parent::tearDown();
     \VIPSoft\CodeCoverageBundle\Test\SQLite3::$proxiedMethods = array();
 }